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.


翻译:联合国《2030年可持续发展议程》强调了节能软件对减少全球碳足迹的重要性。编程语言与执行模型对软件能耗具有显著影响,其中解释型语言通常比编译型语言能效更低。Lua语言正是这一权衡的典型案例:尽管广受欢迎,但其能效表现仍逊于C语言等更环保、更快速的编程语言。本文通过实证研究,系统评估了25个官方解释器版本及即时编译(JIT)环境下Lua的运行性能与能效特性。采用综合性基准测试套件,我们测量了执行时间与能耗数据,以分析Lua的演进趋势、JIT编译的影响以及与其他语言的对比。研究结果表明:所有LuaJIT编译器均显著优于标准Lua解释器。最高效的LuaJIT版本能耗降低约七倍,运行速度提升约七倍。值得注意的是,LuaJIT已接近C语言的能效水平——其能耗约为C语言的六倍,运行速度约为C语言的八分之一。这充分证明了JIT编译技术在提升解释型语言性能与能效方面的显著优势。

0
下载
关闭预览

相关内容

Lua 是一门轻量而快速的脚本语言,功能在高级动态语言中十分完备,对 C API、嵌入式开发以及线程安全的 VM 的支持,使其非常流行。
LLM/智能体作为数据分析师:综述
专知会员服务
36+阅读 · 2025年9月30日
绿色联邦学习:绿色意识AI的新时代
专知会员服务
18+阅读 · 2024年9月20日
《LLM 时代小模型的作用》综述
专知会员服务
49+阅读 · 2024年9月12日
《中国绿色算力发展研究报告(2024年)》,81页pdf
专知会员服务
31+阅读 · 2024年7月14日
《利用人工智能加速能源转型》报告
专知会员服务
85+阅读 · 2022年2月23日
Effective.Modern.C++ 中英文版,334页pdf
专知
26+阅读 · 2020年11月4日
报告 | 绿色制造标准化白皮书(2019年版)(附PDF下载)
走向智能论坛
11+阅读 · 2019年9月10日
一文带你读懂自然语言处理 - 事件提取
AI研习社
10+阅读 · 2019年5月10日
【好文解析】ICASSP最佳学生论文:深度对抗声学模型训练框架
中国科学院自动化研究所
13+阅读 · 2018年4月28日
用Rasa NLU构建自己的中文NLU系统
待字闺中
18+阅读 · 2017年9月18日
视觉里程计:起源、优势、对比、应用
计算机视觉life
18+阅读 · 2017年7月17日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月30日
Arxiv
0+阅读 · 1月16日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员