Ask HN: Will programmers write more efficient code during the memory shortage?
Maybe there will even be more interest in the invention and use of more advanced algorithms and data structures that use less memory?
Maybe there will even be more interest in the invention and use of more advanced algorithms and data structures that use less memory?
Discussion Highlights (19 comments)
tristanj
Programmers won't, but LLMs will.
sneilan1
I've dumped python for anything that doesn't involve scipy / pytorch in favor of go. So yes, I'm having my llm's output go now which is generally more memory efficient than python.
Uptrenda
Lad, modern day "programmers" don't even know what memory is. You'll be lucky to find any "software engineer" who can even tell you what a pointer is.
wseqyrku
I don't think at this point in history limitations drive the the way we do things, abundance does.
winstonwinston
Unless users complain it’s not going to happen. Somehow SPA (Single-page application) consume memory as much as operating system.
novafunc
I don't see the trend reversing, but if we're lucky, perhaps a freeze. Won't get more efficient but may not get worse.
johanvts
Only if people start buying computers with less memory, if they just buy fewer computers it doesn’t seem worhwhile.
pnikosis
There's hope for the extinction of Electron based apps.
int3trap
No. Customers will pay more across all markets.
kantord
For this incentive to exist, the app needs to be such an obvious memory hog that users start identifying it as the source of the problem. Even then, a lot is required for most businesses to prioritize this (presumably) temporary issue at the cost of things like: participation in the AI race, other features, bug fixes, new markets etc. Heck, sometimes software is so inefficient that it costs developer and tester productivity but a fix is not prioritized for years.
martinald
I was thinking about this recently. If you discount web/electron bloat, actually the memory bloat of software isn't hugely terrible. I still often notice that servers on Linux use <1GB of RAM even with relatively high use. I don't think that's really changed massively in 20 years.
cheesecakegood
Memory? Doubt it. But I’m hopefully optimistic that we’ll see a renewed emphasis on speed and responsiveness, since users do notice that despite most products ignoring it.
asp_hornet
> will programmers write Who’s going to tell them?
HaloZero
The memory shortage is really for these insane memory requirements for LLMs. A web browser and the basic mobile app will be fine. The iPhone 17 Pro has the most RAM and it's only 12GB. Hell the iPhone 16 Pro only had 8 GB. The vast majority of consumer cases don't need it. I doubt Apple and other manufacturers will go beyond that to keep prices down.
cornstalks
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.
comrade1234
Will you stop using docker to deploy a simple application? No? Didn't think so.
Joker_vD
Of course not. Why would they? The software nowadays is mostly written for people who already own computers with RAM already installed. Yeah, they probably won't upgrade for the next couple of years, so what? Besides, have you heard about "virtual memory" and "swapping"? Nowadays, SSDs (and especially NVMe) are quite fast, so thrashing is much less of an issue.
andix
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.
nrmitchi
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.