lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


To save everyone a click:

* C, the most efficient, takes 1.0 energy units to solve a given problem
* Top include C, Rust, Java, Swift, Haskell, C#, Go, Dart, JavaScript
* Bottom 5 are Lua (45.98), Jruby (46.54), Ruby (69.91), Python (75.88),
  and Perl (79.58)

Now, this particular study is a little unfair to Lua: Lua is designed to
be embedded in a C program.  In cases where we have a problem which is
using a lot of energy (or is slow), we don’t implement it in Lua.  We
implement it in C, and make a Lua function which calls the C code.

I also think LuaJIT would do a lot better here, but they did not measure
that Lua implementation.

Also, the link is bad.  It’s a link to s Substack summary of a Medium
article about a PDF paper from 2017.  Here is the source paper, to save
everyone two clicks:

https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf