Company
Date Published
Author
Kenton Varda
Word count
4587
Language
English
Hacker News points
None

Summary

On October 4, independent developer Theo Browne published benchmarks comparing server-side JavaScript execution speeds between Cloudflare Workers and Vercel, revealing Cloudflare Workers initially performed worse than Node.js on Vercel by up to 3.5 times. Both platforms use the V8 JavaScript engine, leading to initial surprise at the results, but further investigation uncovered issues related to infrastructure tuning, JavaScript library differences, and benchmarking methodology. Cloudflare addressed these by optimizing routing algorithms, adjusting V8 garbage collector settings, and collaborating on improvements with the OpenNext project, leading to significant performance gains. While some disparities remain, particularly with Next.js, Cloudflare is committed to ongoing improvements and has begun submitting patches to enhance performance for everyone, including contributions to V8 and Node.js. The exercise highlighted the intricacies of benchmarking and the importance of representative testing, prompting Cloudflare to encourage developers to share benchmarks that might indicate performance issues, ensuring continued enhancements across platforms.