TLDR · PROGRAMMING, DESIGN & DATA SCIENCE

SHOPIFY/LIQUID: PERFORMANCE: 53% FASTER PARSE+RENDER, 61% FEWER ALLOCATIONS

simonwillison.net2 min read

Summary from the TLDR newsletter

Shopify's Liquid is an open-source Ruby template engine somewhat inspired by Django. Its developer found dozens of new performance micro-optimizations using a variant of Andrej Karpathy's Autoresearch, a system that runs hundreds of semi-autonomous experiments to find new effective training techniques. Implementing the optimizations resulted in a 53% improvement on benchmarks, an impressive improvement for a code base that's been tweaked with hundreds of contributors over 20 years. The experiment shows how effective the Autoresearch pattern can be.