- everyone assumes their program / website is the only thing running at the machine at a given time, and dev machines are always more powerful than user machines
- it's not really lack of advanced data structures and algorithms that result in the bloat most of the time but the fact that programs and websites are delivered by large teams, there are dozens of submodules that are often loaded even when not needed, and doing it properly is hard to architect to without getting into big complexity and gnarly bugs waiting to happen when someone from other team modifies something and does not know full picture. So it's cheaper to just keep things the way they are to reduce complexity of architecture and fragility.
jakub_g
Some programmers will write more efficient code. At my $dayjob (one of the big tech companies) we're already planning a major goal next year of optimizing server code to reduce RAM requirements, and this is directly in response to the crunch.
In practice I expect most optimizations will come from "stop doing stupid stuff" and not "use fancy advanced algorithms." But that's a cynical perspective so don't be cynical like me.
cornstalks
It's definitely possible, but I agree with many other commenters it probably will not happen.
I wrote an encrypted mesh networking library that runs on normal operating systems. A customer asked me if I could make it run on an ESP32 with 520 kiB of RAM. At first this seemed impossible, but it turned out that it was, and not even that hard. While the original library was not memory hungry at all for a desktop CPU, it still wasted space on unnecessarily large buffers. Cutting those out made the library run on an ESP32 while leaving plenty of room for an application.
Also, my first PC was a 200 MHz single-core 32-bit AMD k6 with 32 MiB of RAM. This ran a graphical OS with browsers, word processors, 3D games and so on. Nowadays you can get a CPU with more than that amount of RAM as just built-in cache.
So a good place to start optimizing code would be to actually get a "severely resource constrained" computer and start making your code work on it.
gsliepen
Programmers will write more efficient algorithms if their employers tell them to trade time-to-market for hardware cost. Previously, it was trade hardware cost for time-to-market.
"Programmers" don't make this decision, the product owner does.
jpollock
If that happens, we will see it in triple-A games first. If some new titles have significant lower hardware specs than expected.
If buyers can't afford the hardware anymore, the studios need to adjust. It's definitively possible to scale games down a lot. There are a few AAA games that were "dumbed down" for the Switch 1 (Hogwarts, cyberpunk, ...). And that's a really low-spec device.
There are two factors: existing gamers not able to afford upgrading. But also new gamers, that might only be able to afford much lower spec PCs than people who bought 2 years earlier.
Why games? Because there is a clear point where people stop buying games. Minimum hw specs are known before buying.
andix
I don't think we will in the HN snark sense of "this react site or electron app uses way too much memory". Those companies will continue to work in the same way, maybe even less efficiently as people chase modern UIs with extra animations or videos or effects, or with some AI code generation tacking on too many features or tech debt.
In specific sectors I do think we will see more optimization. If you're working on cloud compute or AI training / large scale data processing, there will be a big focus on optimization as prices are very large at that scale and shortages have a bigger effect.
Also in gaming I think the next cycle will be different. Big game studios used to push for the best possible graphics that might require the newest consoles or high end gaming computers, but the next releases might not be as much of an upgrade. The next gen of consoles or graphics cards themselves might be delayed, or be less powerful, or be too expensive and flop, as chip manufacturing companies continue focus on more lucrative markets and leave average consumers behind.
naet
No.
Even today it is possible to use languages and programming techniques to be ultra efficient when it comes to memory. It's not that difficult to use them but the world don't care.
Actual example: I have built same utility using Rust, Zig and Haskell (and Go, humorous writeup[0]). Rust binary is 450kb, Haskell binary 30mb. Zig was unfinished but I constrained memory to 512kb just for fun.
Thus it's not about memory per se but more about convenience. Many applications could be scaled by 1-3 degrees of magnitude in memory if they reused techniques but... no one cares.
4K resolution frame is ~40mb uncompressed. Another 10mb is 80k lines of text. Thus fitting in 50mb for 99.8% of applications should be perfectly doable with today's tech.
If the price increase would be per each next 1mb then maaaaaybeeee. But if it's like 100% over GB then I'm sure it won't have any impact.
"will they" seems like the least interesting/useful question though. How can we, e.g. raise awareness in users and programmers that this is possible and useful?
I wanna hang out with coders who care, I wanna read articles about caring and how you can achieve more with less code, and I want to see video content that visualizes the sheer insanity of it all. Like those "scale of the universe" videos, except the complexity isn't fascinating, but embarrassing.
Make it uncool, make software bloat a goober thing you people do at most because they "have to", for pointy-haired bosses, or because they're in a rush or under other constraints. Not something that just gets normalized because hey, thinking is hard, caring is hard, so let's all conspire and pretend we're not being deplorable slobs, under the "leadership" of even worse slobs. There is little technical difficulty here, it's mostly social. Ignorance and greed are in cahoots and don't want to get called out, so call them out.
Though I think to start with, you have to not give a shit about the majority, and huddle with people who care and make better things. If the majority comes around, great, if not, still better than standing on the beach, wondering if the ocean will ever spontaneously take this or that shape.
customguy
I'll just recognise that I'm old (and a bit grumpy): back in the day, if you didn't write minimally efficient code, it simply wouldn't run or it would be terribly slow.
Young devs have not been exposed to this and they can get away with writing inefficient code most of the time, sometimes all of the time.
And even if there is a RAM shortage, we are still in the Gigabyte age. So I don't think we will go back to cycle and byte counting.
I can't even get some devs to care if their query runs in 3s or 8ms.
forinti
Until prices hit the large hyperscalers, I don't think most people are going to make significant changes. You might see a small set of open source projects related to self hosting put in an effort, but in general, I don't think so.
Some big-tech orgs (that have their own hardware) will take costs into account, but they already do that. The "optimization" is more likely to be business-optimizations; "this can be slower if it uses less memory", rather than inventing new stuff.
Note that I am excluding any of the big AI labs. They are definitely going to be working to figure out how to use less memory, but that's primarily not related to the direct cost.
comments (10)
- everyone assumes their program / website is the only thing running at the machine at a given time, and dev machines are always more powerful than user machines
- it's not really lack of advanced data structures and algorithms that result in the bloat most of the time but the fact that programs and websites are delivered by large teams, there are dozens of submodules that are often loaded even when not needed, and doing it properly is hard to architect to without getting into big complexity and gnarly bugs waiting to happen when someone from other team modifies something and does not know full picture. So it's cheaper to just keep things the way they are to reduce complexity of architecture and fragility.
jakub_g
In practice I expect most optimizations will come from "stop doing stupid stuff" and not "use fancy advanced algorithms." But that's a cynical perspective so don't be cynical like me.
cornstalks
I wrote an encrypted mesh networking library that runs on normal operating systems. A customer asked me if I could make it run on an ESP32 with 520 kiB of RAM. At first this seemed impossible, but it turned out that it was, and not even that hard. While the original library was not memory hungry at all for a desktop CPU, it still wasted space on unnecessarily large buffers. Cutting those out made the library run on an ESP32 while leaving plenty of room for an application.
Also, my first PC was a 200 MHz single-core 32-bit AMD k6 with 32 MiB of RAM. This ran a graphical OS with browsers, word processors, 3D games and so on. Nowadays you can get a CPU with more than that amount of RAM as just built-in cache.
So a good place to start optimizing code would be to actually get a "severely resource constrained" computer and start making your code work on it.
gsliepen
"Programmers" don't make this decision, the product owner does.
jpollock
If buyers can't afford the hardware anymore, the studios need to adjust. It's definitively possible to scale games down a lot. There are a few AAA games that were "dumbed down" for the Switch 1 (Hogwarts, cyberpunk, ...). And that's a really low-spec device.
There are two factors: existing gamers not able to afford upgrading. But also new gamers, that might only be able to afford much lower spec PCs than people who bought 2 years earlier.
Why games? Because there is a clear point where people stop buying games. Minimum hw specs are known before buying.
andix
In specific sectors I do think we will see more optimization. If you're working on cloud compute or AI training / large scale data processing, there will be a big focus on optimization as prices are very large at that scale and shortages have a bigger effect.
Also in gaming I think the next cycle will be different. Big game studios used to push for the best possible graphics that might require the newest consoles or high end gaming computers, but the next releases might not be as much of an upgrade. The next gen of consoles or graphics cards themselves might be delayed, or be less powerful, or be too expensive and flop, as chip manufacturing companies continue focus on more lucrative markets and leave average consumers behind.
naet
Even today it is possible to use languages and programming techniques to be ultra efficient when it comes to memory. It's not that difficult to use them but the world don't care.
Actual example: I have built same utility using Rust, Zig and Haskell (and Go, humorous writeup[0]). Rust binary is 450kb, Haskell binary 30mb. Zig was unfinished but I constrained memory to 512kb just for fun.
Thus it's not about memory per se but more about convenience. Many applications could be scaled by 1-3 degrees of magnitude in memory if they reused techniques but... no one cares.
4K resolution frame is ~40mb uncompressed. Another 10mb is 80k lines of text. Thus fitting in 50mb for 99.8% of applications should be perfectly doable with today's tech.
If the price increase would be per each next 1mb then maaaaaybeeee. But if it's like 100% over GB then I'm sure it won't have any impact.
[0]: https://xlii.space/eng/the-four-language-waltz-a-tale-of-all...
xlii
I wanna hang out with coders who care, I wanna read articles about caring and how you can achieve more with less code, and I want to see video content that visualizes the sheer insanity of it all. Like those "scale of the universe" videos, except the complexity isn't fascinating, but embarrassing.
Make it uncool, make software bloat a goober thing you people do at most because they "have to", for pointy-haired bosses, or because they're in a rush or under other constraints. Not something that just gets normalized because hey, thinking is hard, caring is hard, so let's all conspire and pretend we're not being deplorable slobs, under the "leadership" of even worse slobs. There is little technical difficulty here, it's mostly social. Ignorance and greed are in cahoots and don't want to get called out, so call them out.
Though I think to start with, you have to not give a shit about the majority, and huddle with people who care and make better things. If the majority comes around, great, if not, still better than standing on the beach, wondering if the ocean will ever spontaneously take this or that shape.
customguy
Young devs have not been exposed to this and they can get away with writing inefficient code most of the time, sometimes all of the time.
And even if there is a RAM shortage, we are still in the Gigabyte age. So I don't think we will go back to cycle and byte counting.
I can't even get some devs to care if their query runs in 3s or 8ms.
forinti
Some big-tech orgs (that have their own hardware) will take costs into account, but they already do that. The "optimization" is more likely to be business-optimizations; "this can be slower if it uses less memory", rather than inventing new stuff.
Note that I am excluding any of the big AI labs. They are definitely going to be working to figure out how to use less memory, but that's primarily not related to the direct cost.
nrmitchi