🤖 AI Summary
This study investigates the runtime performance and energy consumption limitations of the Lua programming language, evaluating its potential for sustainable software development. Through a systematic empirical analysis, it presents the first comprehensive quantification of execution time and energy usage across 25 official Lua interpreters and JIT compilers, spanning multiple versions. The evaluation employs standard benchmark suites and precise energy measurement tools to enable rigorous comparative analysis. Results reveal that LuaJIT achieves up to sevenfold improvements in both speed and energy efficiency over the best conventional Lua interpreter, substantially narrowing—though not eliminating—the gap with C. These findings underscore the critical role of JIT compilation in enhancing the environmental sustainability of interpreted languages and provide empirical evidence to guide the design of high-performance, energy-efficient scripting languages.
📝 Abstract
The United Nations'2030 Agenda for Sustainable Development highlights the importance of energy-efficient software to reduce the global carbon footprint. Programming languages and execution models strongly influence software energy consumption, with interpreted languages generally being less efficient than compiled ones. Lua illustrates this trade-off: despite its popularity, it is less energy-efficient than greener and faster languages such as C. This paper presents an empirical study of Lua's runtime performance and energy efficiency across 25 official interpreter versions and just-in-time (JIT) compilers. Using a comprehensive benchmark suite, we measure execution time and energy consumption to analyze Lua's evolution, the impact of JIT compilation, and comparisons with other languages. Results show that all LuaJIT compilers significantly outperform standard Lua interpreters. The most efficient LuaJIT consumes about seven times less energy and runs seven times faster than the best Lua interpreter. Moreover, LuaJIT approaches C's efficiency, using roughly six times more energy and running about eight times slower, demonstrating the substantial benefits of JIT compilation for improving both performance and energy efficiency in interpreted languages.