Carbon footprint of applications

Just been thinking about “green computing”.

Is anyone aware of any comparison between the energy consumption (which will be related to carbon footprint) of the equivalent app written in Ruby and Crystal?

Other languages would also be of interest.

I’m thinking we need to include compilation as well just to make it fair.

Here are some simple benchmarks with energy consumption: GitHub - kostya/benchmarks: Some benchmarks of different languages

3 Likes

Awesome - thanks!

Something else to consider is the embodied energy of the computer* that a program is running on. Most of us (myself included) are using fairly new computers to run our software as fast as possible, but one of the theoretical environmental benefits of a fast language like Crystal is that programs written in it can run at acceptable speeds on existing (i.e. “old”) hardware. This is complicated by a lack of dependencies on older systems and the limitations of cross-compilation or compiling on the older hardware itself, but in general the embodied energy of silicon chips is so great that running software on older hardware is worthwhile (environmentally) versus running on newer, more energy-efficient hardware.

* the energy required to mine the raw resources, refine them, and manufacture the computer components

It’s an interesting one - is it better (over the whole lifecycle) to use older (typically less - efficient) hardware that consumes more energy, or newer more efficient hardware with the environmental footprint of additional mining, manufacture and recycling of the old kit?

I suspect you’re right that the old kit, provided we can use it efficiently enough, is probably best.

1 Like