Ranking programming languages by energy efficiency (scientific paper, 2021)

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • are-we-fast-yet

    Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays

  • 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?

  • Smalltalk

    Parser, code model, interpreter and navigable browser for the original Xerox Smalltalk-80 v2 sources and virtual image file (by rochus-keller)

  • 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.

  • 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.

    InfluxDB logo
  • 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.

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts