Performance: 53% faster parse+render, 61% fewer allocations by tobi · Pull Request #2056 · Shopify/liquid

1 min read Original article ↗

added 30 commits

March 11, 2026 07:10
…ter chains without full Lexer pass for name
… filter args without colon
…"combined_µs":4121,"parse_µs":2812,"render_µs":1309,"allocations":25535}
…nResult: {"status":"keep","combined_µs":4184,"parse_µs":2921,"render_µs":1263,"allocations":25535}
…ds respond_to? dispatch\n\nResult: {"status":"keep","combined_µs":4131,"parse_µs":2893,"render_µs":1238,"allocations":25535}
…t: {"status":"keep","combined_µs":4196,"parse_µs":3042,"render_µs":1154,"allocations":25535}
…across templates\n\nResult: {"status":"keep","combined_µs":4147,"parse_µs":2992,"render_µs":1155,"allocations":24881}

@tobi

…ds respond_to? dispatch\n\nResult: {"status":"keep","combined_µs":4103,"parse_µs":2881,"render_µs":1222,"allocations":24881}

@tobi tobi changed the title Performance: 35% faster parse+render, 53% fewer allocations Performance: 47% faster parse+render, 60% fewer allocations

Mar 11, 2026
…,"combined_µs":3818,"parse_µs":2722,"render_µs":1096,"allocations":24881}
…rse, no regex overhead for delimiter finding\n\nResult: {"status":"keep","combined_µs":3556,"parse_µs":2388,"render_µs":1168,"allocations":24882}
…esult: {"status":"keep","combined_µs":3464,"parse_µs":2335,"render_µs":1129,"allocations":24882}
…ants\n\nResult: {"status":"keep","combined_µs":3490,"parse_µs":2331,"render_µs":1159,"allocations":24882}

@tobi tobi changed the title Performance: 47% faster parse+render, 60% fewer allocations Performance: 52% faster parse+render, 60% fewer allocations

Mar 12, 2026
…n) overhead, -12% combined\n\nResult: {"status":"keep","combined_µs":3350,"parse_µs":2212,"render_µs":1138,"allocations":24882}

@tobi

…"status":"keep","combined_µs":3314,"parse_µs":2203,"render_µs":1111,"allocations":24882}

@tobi tobi changed the title Performance: 52% faster parse+render, 60% fewer allocations Performance: 55% faster parse+render, 60% fewer allocations

Mar 12, 2026
…elation) — saves 235 allocs\n\nResult: {"status":"keep","combined_µs":3445,"parse_µs":2284,"render_µs":1161,"allocations":24647}
…ll, cleaner code\n\nResult: {"status":"keep","combined_µs":3489,"parse_µs":2353,"render_µs":1136,"allocations":24647}
…condition evaluation\n\nResult: {"status":"keep","combined_µs":3459,"parse_µs":2318,"render_µs":1141,"allocations":24647}
… allocation per render\n\nResult: {"status":"keep","combined_µs":3496,"parse_µs":2356,"render_µs":1140,"allocations":24530}

@tobi tobi changed the title Performance: 55% faster parse+render, 60% fewer allocations Performance: 52% faster parse+render, 61% fewer allocations

Mar 12, 2026

@tobi

@tobi tobi changed the title Performance: 52% faster parse+render, 61% fewer allocations Performance: 53% faster parse+render, 61% fewer allocations

Mar 12, 2026

basicBrogrammer