mirror of
https://github.com/semihalev/twig.git
synced 2026-03-14 13:55:46 +01:00
- Implemented pooled slices for function arguments - Added specialized pooling for variable node and literal node objects - Modified array and hash node evaluation to reduce allocations - Optimized test and filter evaluation with pooled resources - Added comprehensive benchmarks to validate improvements - Updated node pool implementation to remove duplicate declarations - Fixed memory allocations in merge filter to correctly handle array manipulations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
438 B
Markdown
15 lines
438 B
Markdown
|
|
## Memory Benchmark Results (as of 2025-03-12)
|
|
|
|
Environment:
|
|
- Go version: go1.24.1
|
|
- CPU: 8 cores
|
|
- GOMAXPROCS: 8
|
|
|
|
| Engine | Time (µs/op) | Memory Usage (KB/op) |
|
|
|-------------|--------------|----------------------|
|
|
| Twig | 0.20 | 0.12 |
|
|
| Go Template | 9.31 | 1.34 |
|
|
|
|
Twig is 0.02x faster than Go's template engine.
|
|
Twig uses 0.09x less memory than Go's template engine.
|