Our great sponsors
-
are-we-fast-yet
Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
-
Smalltalk
Parser, code model, interpreter and navigable browser for the original Xerox Smalltalk-80 v2 sources and virtual image file (by rochus-keller)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Lua
Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
If you want to compare different language implementations, you have to somehow control what you compare; the implementations must do the same thing with the same quantity, and especially for VMs and interpreters you want to make sure that you're not comparing a native library call with an interpreted version of the same function. The Are-we-fast-yet has a decent set of rules from by point of view to enable fair comparisons, and even though it's still possible to use ideomatic paradigms supported by the language. Have you seen this document: https://github.com/smarr/are-we-fast-yet/blob/master/docs/guidelines.md?
Lua is pretty fast actually. I implemented the Bluebook Smalltalk-80 VM both in C++ and Lua and the latter is only about 10% slower than the former (see https://github.com/rochus-keller/Smalltalk). I agree that micro benchmarks and non-ideomatic implementations as you can see them e.g. in CLBG are far from optimal for cross-language comparisons; the authors of the paper even used only three of the CLBG benchmarks. Personally, I like this benchmark suite better, but unfortunately the number of implementations is still quite small: https://github.com/smarr/are-we-fast-yet.
To be precise, it's "LuaJIT" (one of a few different "Lua" implementations) that is fast in your project. This is related to my second point, which is how weird it is that the benchmarks in OP use the much slower PUC-Rio Lua implementation instead of LuaJIT.
Related posts
- A C++ version of the Are-we-fast-yet benchmark suite
- The Bitter Truth: Python 3.11 vs. Cython vs. C++ Performance for Simulations
- Comparing Language Implementations with Objects, Closures, and Arrays
- Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
- Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays