Making Turborepo 96% faster with agents, sandboxes, and humans
Blog post from Vercel
Turborepo achieved significant performance improvements, up to 91% faster execution, by optimizing the computation of its task graph in large repositories, with efforts led by Anthony Shew. This was accomplished through a combination of AI coding agents, traditional engineering practices, and profiling tools, such as Vercel Sandboxes and Markdown profiles, which facilitated efficient performance analysis and optimization. Key optimizations included parallelizing sequential operations, reducing redundant allocations and syscalls, and leveraging stack allocation over heap allocation, which led to substantial reductions in execution time and variance. Despite the use of AI agents, the process required active human oversight for decision-making and verification, demonstrating a successful integration of AI support in software engineering while maintaining control over strategic directions.