Has anyone bumped in to any concrete numbers over the environment impact of our usage of suboptimal software, eg js+web tech instead of native desktop apps, the power usage of crypto currencies, the cost of constantly brute forcing problems instead of elegant solutions?

Any data is much appreciated - it trying to write something intelligent about this.

@e8johan this site puts the marginal energy cost of a single transaction at a bit over 500 kWh. For context, a 310L fridge consumes approximately 280 kWh/year.

@rfox @e8johan it's worth noting that mining is only one component of many in a functioning cryptocurrency (and some currencies don't use it), but it accounts for very close to 100% of the energy consumption

@waterbear @e8johan sure - but in a proof of work cryptocurrency, don't you always require mining for transaction verification?

@rfox @e8johan yes. There are non-proof of work currencies which would have much lower energy consumption even if they were as popular as Bitcoin

@e8johan afair bitcoin was order of magnitude of percent of world power usage. Or smaller developed countries

@jacek do you have a good reference (I'll do some searching as well)

@e8johan I don't have any research articles, but there are media publications.

@e8johan This is a great question.

Here's a developer who makes some back-of-the-envelope calculations:

@e8johan @sankakujin
See here some information:

1) viewing webpages with add blockers the energy consumption is 20-25%...
2) in the linked article in the second tooth there are two resources:

This material should be enough for quite long writing :)

@_1751015 @e8johan

Wow, imagine spending this time in one go: sitting around 4 days a year, waiting for ads to be loaded.

@sankakujin @e8johan Interesting: JavaScript looks to be doing great for an interpreted language, but really poorly for a compiled language.

Makes sense since it isn't really either. It's JITed. It's interpreted until it makes sense to compile.

Doubt these tests take into account the braindead hard-to-optimize API design of the DOM, or all the webframeworks webdevs love...

@sankakujin @e8johan Also: My new favourite language, Haskell, appears to be about 3 times as slow as C on all measures. Not bad! Room to improve.

@alcinnz @e8johan
Yeah, I think haskell and rust are at the sweet spot for safe programming languages without stuff like null and good performance.

@alcinnz if you have questions, I like to help with Haskell!
I write Haskell for my day job, hurrah!

@shapr I will!

Right off, I could do with recommendations for a regex engine?

Or, thinking of the topic of this thread, any good benchmarking tips or tools? To see how much energy/time/memory I'm using?

@alcinnz honestly parsers are so powerful and easy I've never had to use regular expressions!
There is a library for regexes, but I've never used it.

@alcinnz I can show you some parsers if you wish, it's easier to write a parser than use a regex. I'm sure there are exceptions, but I've not experienced any in twenty years.

@shapr It's alright, I'm familiar enough with parsing in Haskell. Though I'm happy to say I found most of the parsers I needed prebuilt!

I'll give some context: I'm seeing how hard it is to build my own browser engines (targetting unusual devices), without supporting JavaScript or any of it's APIs.

My need for a regexp engine is to evaluate regexps others give me, in their userstyles or form validation rules. And I'll want to let people configure URL redirection/blocking rules.

@alcinnz criterion is a great benchmarking tool for Haskell code.

@e8johan I thought there was data on the crypto mining power draw.

The BBC has some information.

The other one on js+web tech...I doubt it since the energy savings would be highly dependent on the application and use case. Its going to be hard to say that the power costs of the infrastructure wouldn't be there *anyway* regardless of the efficiencies of a different programming method.

@e8johan Not sure about that use case specifically but Gerry McGovern has a whole book about it with some pretty interesting stats

@BinaryUnit @e8johan World Wide Waste *does* discuss that particular case, amongst other things. Probably the best book you can read on the topic!

@e8johan #IPCC have a bunch of analyses, and I'm pretty sure sector-level investigation includes information technology, though their website / publications are a bit of a mess to explore.

@e8johan Awesome question, although I think you should draw a pretty massive distinction between inefficiency (I'll just brute-force this algorithm) and crypto (consenus algorithms backed by Proof of Work). They both result in a lot of computational energy badly spent, but one of them does that *by design*, while the other is closer to shoddy craftsmanship.


I’m not going to be able to go into detail, but over lunch with a director at a large computing company we once napkin-math'd how many “cars we could take off the road” if our email client trusted spam scores appended to messages by the email host rather than re-evaluating every message downloaded for spam analysis locally

In the next release, on-device spam analysis was disabled if your email provider included spam headers in the messages

@e8johan crypto is a big one, but you should also have a look at the energy costs and toxic byproducts of silicon manufacturing. small / slow computing is about debloating the software that we use so it can run on salvaged hardware. the production run of your next favorite computer will produce more waste than you could save from ditching electron.

@xj9 that is a good point. To me (and you) this is kind of obvious, but as you say, worth pointing out. Despite the physical world being tangible, most do not realize the production impact of modern electronics.

Will you share your text once it's ready? I'd love to read it!

Regarding Bitcoin: Assumptions here are tough. While the hashing power is known, the energy efficiency of the actual hardware used remains unknown (we only know that it varies widely). My diploma thesis focussed on the "fundamental value of bitcoin". Adam Hayes wrote a couple papers modelling a production cost model for the value of bitcoin, that may also be usable for making assumptions/calculations about Bitcoins power draw:

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!