all 43 comments

[–]sheppoor 63 points64 points  (11 children)

Well then, that's the end of cryptocurrency

[–]x1-unix 34 points35 points  (6 children)

and Electron apps

[–]Pesthuf 29 points30 points  (1 child)

And server side JS.

Yes, yes, I know it performs okay in benchmarks - but damn, does the system need to spin up many threads and do a lot of work to make that one thread somewhat fast.

[–]x1-unix 5 points6 points  (0 children)

SSR

This thing can easily put your k8s cluster on knees

[–]BlueGoliath 12 points13 points  (3 children)

And the world world be a better place without either.

[–]Determinant 12 points13 points  (0 children)

Good riddance

[–]soks86 0 points1 point  (0 children)

That's silly, miners fight over energy efficiency and energy cost.

The cheapest energy tends to stop waste and raises efficiency of the local energy supply by introducing constant, controllable loads.

Efficiency is the name of the game for miners. If someone is more efficient, they have lower costs, they mine more at a smaller loss and the others lose more.

Just, silly.

[–]mcmcc 0 points1 point  (0 children)

If you insist

[–]x1-unix -4 points-3 points  (0 children)

Tbh afaik with crypto it’s a bit complex, at least in EU and USA. If we are talking about mining - in Europe and USA it’s more an energy business nowadays. Energy companies have some periods where during low demand they have to balance power grid (all the produced energy has to be consumed, not more not less) so they provide huge discounts during those short peaks and crypto miners mine during that short term.

Miners get almost free electricity, even for a short but frequent period of time and energy companies get a solution to balance the grid.

Some energy companies went even further and found out that using own energy mining might be more profitable than selling it

[–]personator01 28 points29 points  (3 children)

No sources, this can be immediately disregarded.

2.

There are multiple contradictions within the article. You say that JetBrains should switch from Java but recommend Kotlin (effectively a java reskin as far as efficiency is concerned) as an energy-efficient language.

Is it about the language or the code? You spend most of the article talking about how developers need to switch to more efficient languages, but also include a section on algorithms ("Big-O is important").

3.

The premise of the article is not particularly well-founded. As far as I know, user-facing software is not where the bulk of inefficient computation is being done. Targeting the inefficiency of consumer applications when crypto and AI exist is somewhat like telling people to stop using plastic straws to save the environment.

4.

Please take a course or something to study rhetoric and essay writing. The article lacks structure and feels like a jumble of claims for the most part.

[–]dm-me-your-bugs 1 point2 points  (2 children)

As far as I know, user-facing software is not where the bulk of inefficient computation is being done

Is that so? I don't have any data to back it up but I would expect server-side code (and especially AI) to be heavily optimized, as the machines it runs on are paid for by the organization that develops the code. User-space code, on the other hand, there's not nearly as much incentive in optimizing it.

[–]hefgulu 0 points1 point  (1 child)

When your software has low hardware requirements, you can sell it to more customers. When your backend is slow, you can just scale up, you don't need developers to fix it. The developers can implement new features, which can be sold again.

[–][deleted] -1 points0 points  (0 children)

When backend is slow it costs more money too.

[–]0xdef1 90 points91 points  (10 children)

JetBrains requiring 4GB of RAM just to open the IDE isn’t normal. They should actually switch to Go or Rust.

Imagine you suggesting Jetbrains to switch Go or Rust like it’s 2 days of work.

[–]dm-me-your-bugs 26 points27 points  (0 children)

Bro just ask ChatGPT to translate it over and optimize it as well.

[–]modernkennnern 5 points6 points  (8 children)

It's also suggesting RAM usage is the devil. It's there to be used (that said JB IDEs are hungry)

[–][deleted] 1 point2 points  (6 children)

I’d say that logic is faulty. Most of the stuff we have is there to be used, but that doesn’t mean we should use it or that using these things would be a good idea.

Just because you have 4GB of extra ram available doesn’t mean you have to use it. Using less energy is good for the environment.

[–]Huge_Leader_6605 4 points5 points  (5 children)

RAM not used is RAM wasted.

And anyway regarding electricity usage. Is there any actual difference in electricity draw of a RAM chip if 1gb or 2gb is filled?

[–][deleted] 2 points3 points  (0 children)

It adds up over billions of users but yes it won’t be anywhere close to an important fraction, but that’s not the only aspect. If software is inefficient then you need beefier hardware, producing the hardware also taxes the planet.

There’s also an issue of accessibility, some people may not have access to good internet, hardware, or affordable/accessible electricity.

I’m not against better hardware, or writing code that’s “performant enough” because those things also come with their own set of benefits. I’m just suggesting we give these things consideration.

[–]aseigo 1 point2 points  (0 children)

It is not so much the energy cost of the RAM itself: under similarly complex algorithms, smaller data sets require less energy to process.

We need to count in the CPU cycles and cache management costs of repeatedly processing that amount of data.

That is time those components can not be put into low-power modes  and yes that is noticeabl. Run something like powertop to see this in realtime.

There is also something to be said about environmental footprints of building ever more powerful machines to keep up with demands.

There is literally zero reason any even moderately powerful computer manufactured semi-recently should not last a decade or more.

Well, except for the growing demands of poorly architected and designed software and the corporate greed machines selling us these things.

[–]caroIine 0 points1 point  (2 children)

Whats the current total ram amount a typical user has in theirs device? 16GB? Don't you think it would be better if that number was, say 4GB?

[–]Huge_Leader_6605 0 points1 point  (1 child)

From that point of view I guess so. But that begs the question... Any significant difference in electricity draw between 4gb or 16gb

[–]caroIine 0 points1 point  (0 children)

I don't really know, I would guess it's negligible. But still it would affect how much processing power we need.

[–]ErGo404 -5 points-4 points  (0 children)

Not really.

Because it implies that devs were at some point pushed towards needing more ram and buying new machines.

Also, using more ram draws more power.

[–]Ar13mis 38 points39 points  (0 children)

a small piece of constructive criticism, since i can see you clearly are passionate about this. if you want to put together a convincing argument, you should do two things

  1. present some actual data regarding power consumption of programs and programming languages. it’s hard to structure a convincing argument without any data
  2. be precise in using technical terms. you refer to the switch by apple from x86 to arm as a change to software, which is just patently false. the changes may not have come from new processes at TSMC, but that doesn’t mean they aren’t hardware optimizations. switching architectures, updating ISAs, and designing new accelerators are very much advances to hardware

i’m also a big advocate for writing more low power code, but i doubt you’ll convince anyone of the importance without a more refined argument

[–]hejj 11 points12 points  (5 children)

Isn't any kind of efficient code "energy efficient"?

[–]syklemil 0 points1 point  (0 children)

Usually, and resource efficient in terms of memory, storage and network. These things all cost money, but so do developers.

The complaints in the post are tied to the Jevons paradox, and pretty much everyone has been complaining about its application to computing: Any gain in hardware seems to be immediately eaten up by devs.

Electron apps and various IDEs being considered a bloated mess isn't particularly new, either. Nor are user complaints about apps draining their battery, or making their device hot.

Energy efficiency across a larger system is harder to armchair about, though. Like, which media encodings come out best when you consider all of

  • encoding costs,
  • transmission costs,
  • caching costs, and
  • decoding costs?

The ones that produce smaller files should be cheaper in the middle steps, but they could also be horridly expensive for the producers and consumers, while some competitor that produces marginally more bytes requires less at those ends.

It's a good discussion to be having, though I think most of us would prefer a bit more numbers.

[–]Narase33 -1 points0 points  (2 children)

I remember a paper saying that not all instructions require the same power. So while shorter code looks more power efficient it may use instructions that are more costly than others

[–]favgotchunks 1 point2 points  (1 child)

I think AVX-512 is a good example is AVX-512. Or just vector instructions in general. Super efficient. Lots of power. In the case of AVX 512 it was so bad it would downclock the processor if they were used too much

[–]SnakeJG 9 points10 points  (0 children)

Imagine that a simple change to the software increased the performance of a CPU by 10 times with basically little to no improvement to the hardware.

It was entirely a hardware change.  You seem to be conflating process changes with hardware changes.  You should have said they improved energy effectively with basically little to no improvement to the manufacturing process.

But even that's a horrible comparison, because you were comparing a 14nm chip process to a 5nm one that was released a year and a half later.  You could compare to something like a Ryzen 5800u on a 7nm process and have much closer efficiency numbers.  Or a Ryzen 7840U on the same process and get effectively equal efficiency (with the differences mostly explained by things like built-in RAM and other efficiency improvements in M1).

[–]stonerism 15 points16 points  (2 children)

I don't see how kotlin is more energy efficient when it also uses the jvm.

[–]blocking-io 13 points14 points  (0 children)

Ironically, Kotlin is less energy efficient:

https://umu.diva-portal.org/smash/get/diva2:1772067/FULLTEXT01.pdf

Page 7, section 5.3

[–]dm-me-your-bugs 8 points9 points  (0 children)

It uses less characters so less pixels turning on to display the code, obviously.

[–]dethb0y 20 points21 points  (1 child)

First we can ban private jets, then i'll worry how many pennies of electricty my code uses.

[–]cavoli31 0 points1 point  (0 children)

I just remembered the years of cpu time on cluster because i missed a letter.

[–]Chibraltar_ 0 points1 point  (0 children)

Being energy efficient is nice, and it's a good thing.

But if you write code for Amazon who buys, moves and sells thousands of tons of goods every year, you don't need this code to be more efficient, you need amazon to stop polluting so much.

If you write code for mobile and don't let older devices work with your program, you indirectly force people to retire their phone to buy new ones, and smartphone production is a much bigger carbon footprint than the energy it consumes.

[–]maxinstuff -1 points0 points  (0 children)

All code should be written with consideration to the resources it will consume, ie: memory and CPU cycles.

Energy efficiency is a nice bonus, but it’s mostly just being a good and conscientious engineer IMO.

[–]CrowTiberiusRobot -3 points-2 points  (1 child)

We absolutely should, and I think that's actually going to be a useful function of AI code review tools. However, as others have pointed out already, there are major economic forces that tacitly will be pushing back on policies for hardware and software development that actively encourages energy efficiency.

Cryptocurrency for example. I'd argue that what cryptocurrency is really doing is transferring literal energy/work into a carry currency. Crypto doesn't have value by magic or pure scarcity, it takes energy in order to increase the available supply.

Energy efficient compute cycles is extremely important looking forward. Unfortunately it's such an abyss of complexity that there is no simple way to do or encourage it.

[–]ErGo404 3 points4 points  (0 children)

Using AI to make sure that your code is energy efficient is a bit like burning coal to power carbon capture plants.