Live data from Hacker News

The world could run on older hardware if software optimization was a priority

twitter.com

151–160 of 842 posts

Re: The world could run on older hardware if software optimization was a priority

#151
post #11

Earlier quoted context omitted.

It's the kind of economics that shifts the financial debt to accumulating waste, and technical debt, which is paid for by someone else. It's basically stealing. There are --of course-- many cases in which thorough optimizing doesn't make much sense, but the idea of just adding servers instead of rewriting is a sad state of affairs.

> It's basically stealing This feels like hyperbole to me. Who is being stolen from here? Not the end user, they're getting the tradeoff of more features for a low price in exchange for less optimized software.

It’s only a tradeoff for the user if the user find the added features useful.

Increasingly, this is not the case. My favorite example here is the Adobe Creative Suite, which for many users useful new features became far and few between some time ~15 years ago. For those users, all they got was a rather absurd degree of added bloat and slowness for essentially the same thing they were using in 2010. These users would’ve almost certainly been happier had 80-90% of the feature work done in that time instead been bug fixes and optimization.

Re: The world could run on older hardware if software optimization was a priority

#152
post #5

Unfortunately, bloated software passes the costs to the customer and it's hard to evaluate the loss. Except your browser taking 180% of available ram maybe. By the way, the world could also have some bug free software, if anyone could afford to pay for it.

What cost? The hardware is dirt cheap. Programmers aren't cheap. The value of being able to use cheap software on cheap hardware is basically not having to spend a lot of time optimizing things. Time is the one thing that isn't cheap here. So there's a value in shipping something slightly sub optimal sooner rather than something better later. > Except your browser taking 180% of available ram maybe. For most business…

> The hardware is dirt cheap.

Maybe to you.

Meanwhile plenty of people are living paycheck-to-paycheck and literally cannot afford a phone, let alone a new phone and computer every few years.

Re: The world could run on older hardware if software optimization was a priority

#153
post #12

I like to point out that since ~1980, computing power has increased about 1000X. If dynamic array bounds checking cost 5% (narrator: it is far less than that), and we turned it on everywhere, we could have computers that are just a mere 950X faster. If you went back in time to 1980 and offered the following choice: I'll give you a computer that runs 950X faster and doesn't have a huge class of memory safety vulnerabi…

>Personally I think the 1000Xers kinda ruined things for the rest of us.

Reminds me of when NodeJS came out that bridged client and server side coding. And apparently their repos can be a bit of a security nightmare nowadays- so the minimalist languages with limited codebase do have their pros.

Re: The world could run on older hardware if software optimization was a priority

#154
post #17

Earlier quoted context omitted.

IBM PowerPC 750X apparently, which was the CPU the Power Mac G3 used back in the day. Since it's going into space it'll be one of the fancy radiation-hardened versions which probably still costs more than your car though, and they run four of them in lockstep to guard against errors. https://www.eetimes.com/comparing-tech-used-for-apollo-artem...

> fancy radiation-hardened versions Ha! What's special about rad-hard chips is that they're old designs. You need big geometries to survive cosmic rays, and new chips all have tiny geometries. So there are two solutions: 1. Find a warehouse full of 20-year old chips. 2. Build a fab to produce 20-year old designs. Both approaches are used, and both approaches are expensive. (Approach 1 is expensive because as you even…

[deleted]

Re: The world could run on older hardware if software optimization was a priority

#155
post #29

Earlier quoted context omitted.

Except we've squandered that 1000x not on bounds checking but on countless layers of abstractions and inefficiency.

This is something I've wished to eliminate too. Maybe we just cast the past 20 years as the "prototyping phase" of modern infrastructure. It would be interesting to collect a roadmap for optimizing software at scale -- where is there low hanging fruit? What are the prime "offenders"? Call it a power saving initiative and get environmentally-minded folks involved.

IMO, the prime offender is simply not understanding fundamentals. From simple things like “a network call is orders of magnitude slower than a local disk, which is orders of magnitude slower than RAM…” (and moreover, not understanding that EBS et al. are networked disks, albeit highly specialized and optimized), or doing insertions to a DB by looping over a list and writing each row individually.

I have struggled against this long enough that I don’t think there is an easy fix. My current company is the first I’ve been at that is taking it seriously, and that’s only because we had a spate of SEV0s. It’s still not easy, because a. I and the other technically-minded people have to find the problems, then figure out how to explain them b. At its heart, it’s a culture war. Properly normalizing your data model is harder than chucking everything into JSON, even if the former will save you headaches months down the road. Learning how to profile code (and fix the problems) may not be exactly hard, but it’s certainly harder than just adding more pods to your deployment.

Re: The world could run on older hardware if software optimization was a priority

#156
post #12

I like to point out that since ~1980, computing power has increased about 1000X. If dynamic array bounds checking cost 5% (narrator: it is far less than that), and we turned it on everywhere, we could have computers that are just a mere 950X faster. If you went back in time to 1980 and offered the following choice: I'll give you a computer that runs 950X faster and doesn't have a huge class of memory safety vulnerabi…

> If dynamic array bounds checking cost 5% (narrator: it is far less than that)

It doesn’t work like that. If an image processing algorithm takes 2 instructions per pixel, adding a check to every access could 3-4x the cost.

This is why if you dictate bounds checking then the language becomes uncompetitive for certain tasks.

The vast majority of cases it doesn’t matter at all - much less than 5%. I think safe/unsafe or general/performance scopes are a good way to handle this.

Re: The world could run on older hardware if software optimization was a priority

#157
post #29

Earlier quoted context omitted.

Except we've squandered that 1000x not on bounds checking but on countless layers of abstractions and inefficiency.

Am I taking crazy pills or are programs not nearly as slow as HN comments make them out to be? Almost everything loads instantly on my 2021 MacBook and 2020 iPhone. Every program is incredibly responsive. 5 year old mobile CPUs load modern SPA web apps with no problems. The only thing I can think of that’s slow is Autodesk Fusion starting up. Not really sure how they made that so bad but everything else seems super s…

They're comparing these applications to older applications that loaded instantly on much slower computers.

Both sides are right.

There is a ton of waste and bloat and inefficiency. But there's also a ton of stuff that genuinely does demand more memory and CPU. An incomplete list:

- Higher DPI displays use intrinsically more memory and CPU to paint and rasterize. My monitor's pixel array uses 4-6X more memory than my late 90s PC had in the entire machine.

- Better font rendering is the same.

- Today's UIs support Unicode, right to left text, accessibility features, different themes (dark/light at a minimum), dynamic scaling, animations, etc. A modern GUI engine is similar in difficulty to a modern game engine.

- Encryption everywhere means that protocols are no longer just opening a TCP connection but require negotiation of state and running ciphers.

- The Web is an incredibly rich presentation platform that comes with the overhead of an incredibly rich presentation platform. It's like PostScript meets a GUI library meets a small OS meets a document markup layer meets...

- The data sets we deal with today are often a lot larger.

- Some of what we've had to do to get 1000X performance itself demands more overhead: multiple cores, multiple threads, 64 bit addressing, sophisticated MMUs, multiple levels of cache, and memory layouts optimized for performance over compactness. Those older machines were single threaded machines with much more minimal OSes, memory managers, etc.

- More memory means more data structure overhead to manage that memory.

- Larger disks also demand larger structures to manage them, and modern filesystems have all kinds of useful features like journaling and snapshots that also add overhead.

... and so on.

Re: The world could run on older hardware if software optimization was a priority

#158
I heartily agree. It would be nice if we could extend the lifetime of hardware 5, 10 years past its, "planned obsolescence." This would divert a lot of e-waste, leave a lot of rare earth minerals in the ground, and might even significantly lower GHG emissions.

The market forces for producing software however... are not paying for such externalities. It's much cheaper to ship it sooner, test, and iterate than it is to plan and design for performance. Some organizations in the games industry have figured out a formula for having good performance and moving units. It's not spread evenly though.

In enterprise and consumer software there's not a lot of motivation to consider performance criteria in requirements: we tend to design for what users will tolerate and give ourselves as much wiggle room as possible... because these systems tend to be complex and we want to ship changes/features continually. Every change is a liability that can affect performance and user satisfaction. So we make sure we have enough room in our budget for an error rate.

Much different compared to designing and developing software behind closed doors until it's, "ready."

Re: The world could run on older hardware if software optimization was a priority

#159

Earlier quoted context omitted.

People conflat the insanity of running a network cable through every application with the poor performance of their computers.

Correction: devs have made the mistake of turning everything into remote calls, without having any understanding as to the performance implications of doing so. Sonos’ app is a perfect example of this. The old app controlled everything locally, since the speakers set up their own wireless mesh network. This worked fantastically well. Someone at Sonos got the bright idea to completely rewrite the app such that it wasn…

Presumably they wanted the telemetry. It's not clear that this was a dev-initiated switch.

Perhaps we can blame the 'statistical monetization' policies of adtech and then AI for all this -- i'm not entirely sold on developers.

What, after all, is the difference between an `/etc/hosts` set of loop'd records vs. an ISP's dns -- as far as the software goes?

Re: The world could run on older hardware if software optimization was a priority

#160
post #91

There is an argument to be made that the market buys bug-filled, inefficient software about as well as it buys pristine software. And one of them is the cheapest software you could make. It's similar to the "Market for Lemons" story. In short, the market sells as if all goods were high-quality but underhandedly reduces the quality to reduce marginal costs. The buyer cannot differentiate between high and low-quality g…

Even if end-users had the data to reasonably tie-break on software quality and performance, as I scroll my list of open applications not a single one of them can be swapped out with another just because it were more performant. For example: Docker, iterm2, WhatsApp, Notes.app, Postico, Cursor, Calibre. I'm using all of these for specific reasons, not for reasons so trivial that I can just use the best-performing solu…

I’m surprised in your list because it contains 3 apps that I’ve replaced specifically due to performance issues (docker, iterm and notes). I don’t consider myself particularly performance sensitive (at home) either. So it might be true that the world is even _less_ likely to pay for resource efficiency than we think.
Post reply on HN