Live data from Hacker News

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

twitter.com

41–50 of 842 posts

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

#41
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…

The problem is 1000xers are a rarity.

The software desktop users have to put up with is slow.

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

#42
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 users, running the browser is pretty much the only job of the laptop. And using virtual memory for open tabs that aren't currently open is actually not that bad. There's no need to fit all your gazillion tabs into memory; only the ones you are looking at. Browsers are pretty good at that these days. The problem isn't that browsers aren't efficient but that we simply push them to the breaking content with content. Content creators simply expand their resource usage whenever browsers get optimized. The point of optimization is not saving cost on hardware but getting more out of the hardware.

The optimization topic triggers the OCD of a lot of people and sometimes those people do nice things. John Carmack built his career when Moore's law was still on display. Everything he did to get the most out of CPUs was super relevant and cool but it also dated in a matter of a few years. One moment we were running doom on simple 386 computers and the next we were running Quake and Unreal with shiny new Voodoo GPUs on a Pentium II pro. I actually had the Riva 128 as my first GPU, which was one of the first products that Nvidia shipped running Unreal and other cool stuff. And while CPUs have increased enormously in performance, GPUs have increased even more by some ridiculous factor. Nvidia has come a long way since then.

I'm not saying optimization is not important but I'm just saying that compute is a cheap commodity. I actually spend quite a bit of time optimizing stuff so I can appreciate what that feels like and how nice it is when you make something faster. And sometimes that can really make a big difference. But sometimes my time is better spent elsewhere as well.

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

#43

Let's keep the CPU efficiency golf to Zachtronics games, please. I/O is almost always the main bottleneck. I swear to god 99% of developers out there only know how to measure cpu cycles of their code so that's the only thing they optimize for. Call me after you've seen your jobs on your k8s clusters get slow because all of your jobs are inefficiently using local disk and wasting cycles waiting in queue for reads/writ…

> I/O is almost always the main bottleneck. People say this all the time, and usually it's just an excuse not to optimize anything. First, I/O can be optimized. It's very likely that most servers are either wasteful in the number of requests they make, or are shuffling more data around than necessary. Beyond that though, adding slow logic on top of I/O latency only makes things worse. Also, what does I/O being a bott…

I/O _can_ be optimized. I know someone who had this as their fulltime job at Meta. Outside of that nobody is investing in it though.

I'm a platform engineer for a company with thousands of microservices. I'm not thinking on your desktop scale. Our jobs are all memory hogs and I/O bound messes. Across all of the hardware we're buying we're using maybe 10% CPU. Peers I talk to at other companies are almost universally in the same situation.

I'm not saying don't care about CPU efficiency, but I encounter dumb shit all the time like engineers asking us to run exotic new databases with bad licensing and no enterprise features just because it's 10% faster when we're nowhere near experiencing those kinds of efficiency problems. I almost never encounter engineers who truly understand or care about things like resource contention/utilization. Everything is still treated like an infinite pool with perfect 100% uptime, despite (at least) 20 years of the industry knowing better.

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

#44
post #39
post #29

Earlier quoted context omitted.

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

Most of it was exchanged for abstractions which traded runtime speed for the ability to create apps quickly and cheaply. The market mostly didn't want 50% faster code as much as it wanted an app that didn't exist before. If I look at the apps I use on a day to day basis that are dog slow and should have been optimized (e.g. slack, jira), it's not really a lack of the industry's engineering capability to speed things…

I don’t think abundance vs speed is the right lens.

No user actually wants abundance. They use few programs and would benwfit if those programs were optimized.

Established apps could be optimized to the hilt.

But they seldom are.

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

#45
post #29
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…

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.

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

#46
We've been able to run order matching engines for entire exchanges on a single thread for over a decade by this point.

I think this specific class of computational power - strictly serialized transaction processing - has not grown at the same rate as other metrics would suggest. Adding 31 additional cores doesn't make the order matching engine go any faster (it could only go slower).

If your product is handling fewer than several million transactions per second and you are finding yourself reaching for a cluster of machines, you need to back up like 15 steps and start over.

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

#47
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…

Most programming languages have array bounds checking now.

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

#48
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…

I don't think it's that deep. We are just stuck with browsers now, for better and worse. Everything else trails.

We're stuck with browsers now until the primary touch with the internet is assistants / agent UIs / chat consoles.

That could end up being Electron (VS Code), though that would be a bit sad.

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

#49

The priority should be safety, not speed. I prefer an e.g. slower browser or OS that isn't ridden with exploits and attack vectors. Of course that doesn't mean everything should be done in JS and Electron as there's a lot of drawbacks to that. There exists a reasonable middle ground where you get e.g. memory safety but don't operate on layers upon layers of heavy abstraction and overhead.

Unfortunately currently the priority is neither.

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

#50
I've installed OSX Sequoia on 2015 iMacs with 8 gigs of ram and it runs great. More than great actually.

Linux on 10-15 year old laptops and it runs good. if you beef up RAM and SSD then actually really good.

So for everyday stuff we can and do run on older hardware.

Post reply on HN