BlogsCloudflareLuaJIT Performance Benchmarking and Optimization

LuaJIT Performance Benchmarking and Optimization

LuaJIT Performance Benchmarking and Optimization

2
posts
2017–2018

Cloudflare has been involved in improving LuaJIT performance through a research project at King's College London. This project focused on developing a comprehensive benchmark suite for Lua implementations, analyzing the performance of different LuaJIT forks (original LuaJIT and RaptorJIT), and identifying areas for optimization. The work has led to a better understanding of VM warmup behavior and performance characteristics across various benchmarks.

2018

More consistent LuaJIT performance

12/12/2018

This post details the progress of a year-long project to improve LuaJIT performance. Key contributions include the creation of a larger, more robust Lua benchmark suite, the development of a simple benchmark runner (simplerunner.lua) with statistical analysis (mean, confidence intervals), and a comparative performance analysis of the original LuaJIT repository and RaptorJIT. The post presents detailed benchmark results for both implementations and a comparison between them, highlighting performance differences across various benchmarks and providing classifications for their behavior (e.g., warmup, flat, slowdown).

2017

Helping to make LuaJIT faster

10/19/2017

This post details a research collaboration between Cloudflare and King's College London to improve LuaJIT performance. It highlights the complexity of JIT compilers, the challenges of VM benchmarking (especially warmup behavior), and the hypotheses that VM heuristics interact in misunderstood ways and that rigorous benchmarking is crucial for performance predictability. The project aims to leverage a new benchmarking system (Krun and warmup_stats) and the expertise of a LuaJIT specialist to make performance improvements and contribute them back to the open-source community.