I Have a dream! a Green dream -- Does Julia save energy?

I wouldn’t feel too bad about CI. Let’s do a bit of fun order of magnitude analysis!

  • Your average laptop draws ten to a few tens of Watts at idle. Let’s overestimate at 100W at max load.
  • My typical packages take less than a minute to run through tests. Arguably for a good dev experience it should be < 10s, perhaps, but let’s call it 100s.
  • Let’s imagine several CI configurations for different Julia versions and operating systems. 10, say.

So all up, a single CI run is 100J/s * 100s * 10 = 100kJ which is probably an overestimate for most (but not all packages) I’ve written. For comparison:

  • That’s about the chemical energy in a small tomato
  • The typical human needs on the order of approximately 10_000 kJ per day of food energy. That’s ~100 CI runs per day per person, or at least tens of CI runs even if you’re starving.
  • There’s around 30_000 kJ of chemical energy in a litre of gasoline which is ~300 CI runs. If you’re willing to drive 5 km (0.25L of fuel, say) then you should be willing to do 75 CI runs!
  • The world average total energy usage per person is apparently around 20_000 kWh per year (See eg, Energy use per person - Our World in Data). This is ~200_000 kJ per day, or 2000 CI runs per day.

Largely, I don’t think computing is something the average user needs to be worried about! Other energy intensive human activities are much more concerning.

11 Likes