Hacker News new | ask | show | jobs
by intsunny 903 days ago
I shudder to think how many sky high electricity bills and greenhouse gases were released to needlessly compile the same software over and over again.
14 comments

Probably orders of magnitude less than the amount of wasted energy and greenhouse gases emissions of needlessly compiling the same javascript software over and over again on the billions of devices used to access the web.
Not to talk about all the batteries we burn out from it or the billions of devices that is replaced solely because we run so utterly inefficient software.
compared to the average power draw of activities like gaming? probably not a significant amount.
Probably not that much. It's not like gentoo was widely used compared to Red Hat or Ubuntu. Also CPU power usage is a rounding error if the computer was on anyways compared to the spinning HDD, monitor etc.
As far as hobbies go, it's very far from the worst. Some people play games for 12 hours a day on kilowatt gamer PCs, or race their car around a track, or cruise around on a gas guzzling boat, etc.
Probably a fraction of a fraction of 1% of the power used by Microsoft to constantly collect personal data from Windows 10 users 24/7.
Do you think that many people were even using it and compiling regularly? I left it around 2010 for linux mint. Just last summer I tried it again just out of curiosity, and couldn't even get it installed. They had a broken release and of course there was some hack to re-update everything back to the last stable version, which gave me flashbacks of what Gentoo Life was all about and I stopped then and there.
Not to mention the wastefulness of general purpose CPUs. Most computer use is in the browser, why don’t we have a Firefox ASIC yet?
probably less watts than the full screen videos and rendered play worlds that are drawn behind the main menu on any given AAA console game bought by millions of people.

given the behavior one can only think that software people generally don't care unless it bothers a user metric like 'battery life'.

Wanna talk about JS? Java?
Contrary to popular belief, Java is amongst the most efficient languages regarding power consumption.
I was referencing directly the amount of compilation, not necessarily the power consumption. But with regards to ecological impact, I would guess you have Java on a server in your mind.

But, the biggest Java user in term of number of devices is Android. And every time you install an app, you compile it. Including every time you update it (which nowadays is... everyday?). Also it'll recompile in background to use pgo. Nowadays [1] Google could pretty much compile it server-side for most devices, and save a lot of battery wear (batteries wear when getting hot, and compiling, weirdly, heats), in addition to power consumption.

It depends on how you use it. For long running applications like services, yeah, the JIT will get the bytecode down to some very high quality machine code. If you write lots of small applications and compose them using something like Unix, then Java is very inefficient.
That's so funny that Java was also the first thing that i had in my mind...also python and "LLM training".
nothing compared to msmpeng.exe, which spins several cores constantly 24/7

(microsoft's anti-virus)

I heat my home. The difference between heating via compiling my kernel and heating via whatever heating you use is almost certainly negligible. But I get a custom built system out of it too.

I don't cool my home, though.

The difference between a heat pump and resistive heating is certainly not negligible.
Well, even if everyone did have heat pumps, let's think about it a bit. I upgrade my system about once a week. I reckon on average it's about 1 hour of compiling per week but let's say 2 to be safe. That's no more than 1 kWh per week. A fridge-freezer will use that in a day. An electric oven will use that in 15 minutes. An electric car will use that travelling 3-4 miles. Most households use something like 30 kWh per day to heat. Even if a heat pump made that like 10 kWh it's still a drop in the ocean. And don't forget the resulting binaries run slightly more efficiently because they are compiled specifically for my CPU, plus I enjoy it.
What’s your standard build look like at work and how Many times a day does it run? Does it go all the way to deploying a dev cluster??
Probably less then they pay out for some TX based miners to shut down when grandma starts freezing.
Crypto mining, ML training, NSA servers holding all your data forever...