Energy efficiency of programming languages, OCaml tops functional ones

Scroll to the bottom for some more intuitive graphs.

https://sites.google.com/view/energy-efficiency-languages/results

Originally tooted here: https://mstdn.io/@orbifx/6852027

2 Likes

Not clear if they used Flambda

https://sites.google.com/view/energy-efficiency-languages/setup says they used 4.05. If we take that to mean the 4.05 opam switch, that means no flambda, correct?

Also, in your opinion would flambda reduce the energy consumption?

Less CPU usage and less RAM usage (from allocations) should improve things.

As long as they don’t compare compile times… but they don’t do that for any implementation so it looks like everybody is allowed to compile however long they want.

Not only that, Rust, haskell and C++ using templates would most likely be last in terms of compilation times.

1 Like

The regex-redux case, where OCaml is fairly weak, could probably be improved by replacing str with re.