The Green Side of the Lua

(arxiv.org)

30 points | by radiator 3 days ago

7 comments

  • winter_blue 10 minutes ago
    I'd like to see a study that compares Python and Ruby, against (1) Rust, (2) C, (3) C++, (4) Zig, (5) Go, (6) a JVM language (like Scala or Kotlin or Clojure), and (7) the main CLR language (C#).

    I would imagine that all 7 of them absolutely trounce Python and Ruby.

    Python and Ruby have been an immense environmental (and type safety) disaster.

    JS though (via V8 and other engines) has been surprisingly fast. I've always wondered why Python and others couldn't copy some of the tricks V8 uses to be fast...

  • Rochus 2 days ago
    Interesting results. Particularly they barely found a speed-up of newer compared to older LuaJIT versions (rather the contrary). Maybe they should have used the Are-we-fast-yet suite instead of the (random looking) set of microbenchmarks. I did measurements of Lua and LuaJIT some time ago based on Are-we-fast-yet and saw significant differences in LuaJIT performance (see http://software.rochus-keller.ch/are-we-fast-yet_LuaJIT_2017...).

    I also compared different PUC Lua versions in an earlier measurement (see http://software.rochus-keller.ch/are-we-fast-yet_lua_results...) and found similar significant differences between versions.

  • vaylian 43 minutes ago
    The nice thing about Lua is that it can easily be combined with compiled languages. If you identify the hot path in your program, you can implement them in a more efficient language.
  • perilunar 19 minutes ago
    Save a few watts per device making the client-side code a bit more efficient.

    Spend Gigawatts running data centres for LLMs.

  • PaulRobinson 50 minutes ago
    Energy efficiency as a "my language is better than yours" point was not on my bingo card for 2026.

    JIT as an energy saver intuitively makes sense, and is probably the model most languages need to think about for "shipping to prod". I'm aware Python has started developing this, and given the install base, it's encouraging that results like this show it could have significant benefits for users.

  • fouronnes3 42 minutes ago
    Is a paper that publishes a 0.01% improvement of something at the cost of 5 times more power really an improvement? I believe that every single computer science measurement metric should have Joules or Watts in the denominator. If you are training a model I want to see performance per total energy consumed. If you are measuring inference accuracy, measure PER WATT.

    I've always been a bit confused by the apparent tendency of the computer science field to mostly ignore energy and power. We are too often satisfied with the idea that software and programs exist in a perfect whiteboard world of xkcd 505 abstract compute.

  • aa-jv 1 hour ago
    As someone who has shipped Lua as a solution to many an embedded dilemma, this is highly interesting work.

    I wonder if there will be motivation in the future to address energy consumption in future JIT work .. in fact I wonder whether other languages are going to face a similar optimization path. It would be grand to see progress being made on this at a more general scale. I'm looking at you, Python ..