Vascula v0.1.5

Performance

#Benchmarks

The same templates and data, rendered by Vascula, the Go Liquid implementation (github.com/osteele/liquid) and Shopify's Ruby Liquid (with YJIT), on one Linux machine. Lower is better.

WorkloadVasculaGo LiquidRuby Liquid
Product grid, 48 products100 µs320 µs352 µs
where | sort | map | join over 48 products8.5 µs27 µs37 µs
The same, products with 150 fields each10.5 µs30 µs38 µs
Compiling the grid template9 µs32 µs89 µs

Measured on 2 October 2026. The grid template prints titles, prices and tags with conditions and nested loops; it is in the engine's benchmark suite.

#Keeping templates fast

  • Filter before you loop. {% assign visible = items | where: "visible" %} then loop over visible, rather than an if around every iteration.
  • **Use limit.** {% for p in products limit: 8 %} stops early.
  • Avoid loops inside loops over large collections. They multiply work and are the usual cause of too many steps.
  • Give templates only the data they need. Smaller data is faster to load and to check.
  • Compile once. Keep compiled templates and reuse them; see Embedding.
  • Cache children. Your resolver runs for every render tag; return compiled templates from a cache.