Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love calculations like this and hope they are part of every engineer’s line of thinking. I originally came across this thinking in Andy Hertzfeld’s book - https://www.folklore.org/StoryView.py?story=Saving_Lives.txt

Performance is time, energy, heat. It’s one of the easiest features to get and there are lots of tools, research, and philosophies to help get it. Memory and storage are similar.

For anyone working on large scale apps that are on millions of devices, hundreds of thousands of servers, or even just some back office guy who has minutes less stress in his day, performance benefits the world. For programmers, it’s one of the easiest ways to Save the Planet™.



Don't forget the waste caused by people throwing away devices that are "too slow", and the resources required to build new computers/phones.

Somewhere I saw a rough figure about phones. Something like: if everyone was able to keep their phone one year longer, it would be the equivalent of 600,000 cars off the road or something. (Just looked it up - source is possibly the founder of iFixit).

But you know, development velocity or whatever.


Yep. Most things most users do on our computers could be done just fine on a computer from 10 years ago. I think we're on a performance treadmill like this:

- Developers get new, fast devices (yay). We make our software just fast enough to run smoothly (enough) on our own devices. Then we ship it.

- Users' computers are slower than the developers' computers. Users experience is bad because the software is slow.

- Users buy new computers too. Money is poured into R&D for even faster computers.

- Hardware companies release faster hardware

- Developers buy new, fast computers

And the cycle continues.

For general purpose computing, there's not really any meaningful difference between my computer today and my computer 15 years ago. But I can't use that old computer, because modern programs don't work well on it any more. I can't imagine how slow modern Discord or Microsoft Teams would run on my old 2012 macbook air - even though that machine is orders of magnitude faster than the computer I was using to chat on IRC in the late 90s.

I'm low key convinced that if computers and phones stopped getting faster tomorrow, the software industry would grumble but get on with things and adapt. Users wouldn't really notice anything change, except we'd all be richer because we would no longer need to buy new computers every few years.

There's a few notable exceptions of course: modern AI, video production & animation, and massive cloud services (like Google and Netflix) who actually optimize their code. I'm on the fence about compilers - do LLVM & rustc really need to be that slow? Netflix might never make it to 8k video (boo hoo). And ray traced video games might not happen. But the average consumer would probably be delighted. And the savings to the environment would be insane.


This is interesting, but maybe our software is doing a lot more today than it was back then. I guess the question is whether those things are necessary. There is of course some software that is just slower because of negligence too.

I remember using a computer 20 years, and they would take multiple minutes to boot into something that was usable, and executing programs would take quite a few seconds because the HDD had to go searching for stuff the executable required.

My current desktop has a Samsung 970 NVME SSD, it boots up in like 20 seconds or something, and everything is extremely responsive as far as reading from the disk goes.

It's interesting that the one thing that hasn't been completely neutralized by the treadmill is SSDs!

Also the LLVM and Rustc thing is interesting. I imagine they are doing much more advanced optimizations than what compilers did 20 years ago so they probably have a good excuse, but I think these optimizations are also neutralized by the treadmill eventually.


chromium 111 source is 1.7GB compressed with xz(lzma). google has completely lost whatever minds they may have had, and included more code than one would imagine exists in the whole damn world.

it is an absolute abomination, and these words does not even remotely do justice to just how horrible it is


Actually, in the PC/laptop space, I believe this phenomenon has been waning somewhat over the past... oh, the better part of a decade.

This is a result of:

* Single-core performance no longer dramatically improving - almost plateauing

* The rate or extent of "bells and whistles" and other OS overhead being added - decreasing.

* Budget consumer CPUs having reached smooth desktop performance (with sufficient memory and and an SSD) already, even with multiple applications open.

.. and all of these had not been the case during the 1980s, 1990s and 2000s. Now, if your machine's hardware doesn't brake down - and you're just a plain desktop user - your motivation for throwing away your machine is quite limited.

---

Of course, this is not the case for smartphones, we're still on the roller-coaster there.


I would say we're coming to that point with phones too. Phones have also largely reached the end of their breakneck big-annual-improvement phase; There's little annual improvement in performance, power consumption, form factor or feature set. Screen resolutions are plenty high for most users, similar for the cameras. Most people would also probably be quite happy with the version of Android or iOS they are using if it kept getting bugfixes and security updates.


> Most people would also probably be quite happy with the version of Android or iOS they are using if it kept getting bugfixes and security updates.

Absolutely! Most non-tech folks would be delighted by this. Regular users generally don't care one bit about whatever fad style or trendy feature got added with the latest update, they are just annoyed that their buttons or icons got moved around.


> Most non-tech folks would be delighted by this.

And many tech folks too. My phone is a tool, not a lifestyle. I don't need my tools constantly changing out from under me.


Here's an anecdote.

I like to look at websites that offer "last season" outdoor gear at discounted prices. The major frustration is that the sizes are never my size of shoe/shirt/etc because the popular sizes are gone sooner than the odd sizes.

There is no "domain-specific" improvement (The "domain" in this case being "last season discount retailer.") to the basic shopping cart ecommerce experience that would give me a way to flag my interested product or product category so that I could be notified when the item is in-stock.

This basic feature would vastly improve my interaction with the websites and would probably result in higher sales.

In today's world, that's a huge ask to have that kind of feature implemented.

Heck, even asking for a good "syntaxable" search seems to be an impossible ask. Imagine being able to search "Category: Shoes; Brand: "North Face"; Price: >50&&<120"

The fact that this is never implemented yet billions of dollars are poured into ecommerce development kinda reflects how the industry is focused on improving the tooling/back end and not the design.

I see vastly more posts in this vein: "Nobody really knows how this complicated spaghetti-like system works"

than in this vein: "X tool allowed us to build a Maserati of our domain."


It can be a bit dangerous (especially to your employer) to continue that line of thinking, though. How many pieces of software do we collectively work on which would make the world a better place if they didn't exist at all?


Meh. I feel like there needs to be an active movement to assess programs that have huge scale (>10m users) to identify unnecessary power usage - whether it be because of a bug, because of unused functionality that nonetheless takes resources, or intermediate steps that take unnecessary power.

Perhaps I’m getting into a bit of a niche here, but the rise of stringy formats for data transfer concerns me. There are many-stage pipelines on machines that agree on what a 64 bit integer is, yet each stage performs encoding and decoding of JSON twice (decoding upon receipt, encoding to pass it on to the right place, decoding the response, encoding it in another manner to reply to the original sender). Sounds like a minor concern, but the scale of this instinctively feels like it’d dwarf 250MW globally.


Is that really a downside?

In some cases you convince your organization to shift focus onto more useful products, and that can be a really great feeling. In other cases (company is too large, management too committed) it helps you confront exactly who you're working for. Because if you're going to sell your soul, you should at least make sure you're getting a good price.


Oh no!

… anyway…


If your job and your conscience disagree, quit your job. You only get one life and we have so many options as engineers.

Why make the world worse for ourselves and our children when you have other options?


How did the idea of avoiding premature optimization get misapplied to client-side apps where the entity writing the software is not the one paying for electricity, cooling, and people's time when the software takes much longer to run than it could? When did a lot of software devs stop caring?

Pardon me, I think there are some electron devs at my door asking for a word. They might have baseball bats.


Premature optimization should be avoided client side as well I imagine? It just seems like lots of development shops skip optimization altogether, even when it stops being Premature (when it matures?).

And it's not like those Shops suffer for it, so it isn't very surprising they continue.


>> When did a lot of software devs stop caring?

I'm not sure the devs stopped caring as much as the powers at be. Software development has become more commoditized than we want to believe. Devs following an agile workflow with every intent of performing multiple rounds of optimization find that the product gets shipped as soon as it approximates the thing that had been conceived originally.

It doesn't look like an immediate failure, so the less that leadership takes from it is frequently that the level of maturity they shipped is safe. The cycle continues and eventually folks lower down succumb to this shipping pattern. The only things that get them to optimize is competition that successfully drive home their win was due to performance. This doesn't always lead to optimizations when you are an incumbent who can still close more feature gaps because those often result in higher sales and revenue.


I use a 7 year old low-power laptop. Cooling, electricity usage, and performance of Electron apps are never an issue. Crashes, bugs, lost data, and bad usability still are. I’d rather have devs spend time on that stuff.

If Electron frees up organizational resources to do what’s actually important, I applaud devs for using it.


Not an issue for you, that you know of, because you have no equivalent software that's written in a more performant language (or at least critical portions of the codebase written in a more performant language). That's part of the problem; in most cases, software users don't know what life would be like with better software. They assume the performance they see is close to optimal, or at least that the devs made an effort to optimize. Users are willing to get used to whatever the software's performance is, in order to have access to the software's features. You can get used to almost anything, as suboptimal performance turns into background noise, but that doesn't mean you should. You get used to waiting 5 seconds for a piece of software to do something that you do on average once every hour or two, not realizing that those 5 seconds, 10 times a day, 365 days a year, cost you 5 hours every year.

Optimizing performance and fixing crashes/bugs/dataloss aren't mutually exclusive, either. Developers who care less about code quality than checking boxes for features requested by management or customers, will write code that's both suboptimal and buggy.


> Not an issue for you, that you know of, because you have no equivalent software that's written in a more performant language

How on earth would you know that? No, incorrect.


There's a similar calculation (in a slightly different context) in a good scene in the movie Margin Call, about all the miles and hours saved by one bridge: https://www.youtube.com/watch?v=m8Mc-38C88g




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: