go-twig/benchmark/MEMORY_RESULTS.md
semihalev e226efbbfb Optimize string to byte conversions during rendering
- Added byteBufferPool to reuse buffers during rendering
- Implemented WriteString utility function to eliminate allocations
- Updated all node Render methods to use the optimized function
- Reduced memory allocations during template rendering
- Added benchmarks showing significant improvement with io.Writer

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-11 14:16:29 +03:00

438 B

Memory Benchmark Results (as of 2025-03-11)

Environment:

  • Go version: go1.24.1
  • CPU: 8 cores
  • GOMAXPROCS: 8
Engine Time (µs/op) Memory Usage (KB/op)
Twig 3.24 1.23
Go Template 8.71 1.26

Twig is 0.37x faster than Go's template engine. Twig uses 0.98x less memory than Go's template engine.