Live data from Hacker News

Ask HN: Will programmers write more efficient code during the memory shortage?

news.ycombinator.com

201–210 of 264 posts

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#201
post #190

Earlier quoted context omitted.

> If that happens, we will see it in triple-A games first. If some new titles have significant lower hardware specs than expected. Recently I booted up Insurgency: Sandstorm. With a 5800X and an Intel Arc B580 at 1080p and high graphics, the game runs at around 200 FPS. Meanwhile, pretty much any modern UE5 title (with the exception of Ready or Not and Split Fiction, from what I've seen) runs horribly - the interesti…

Yes, Lumen (and raytracing in general) has a performance overhead. If you don't want that you can skip that feature. Split Fiction and other games choose to do so. I think certain games like Robocop are awesome on UE5.

> If you don't want that you can skip that feature.

Unfortunately, for the consumer this can also mean skipping some games altogether: for example, I might not be able to play the latest Indiana Jones or Doom game because they refuse to let RT be disabled (unless they get enough pushback, but we can all see where things are heading).

At least there are some (usually indie) games that let you do that, like Incursion: Red River but even with Lumen and other features turned down, the performance is still worse than UE4 games of comparable scene fidelity (not necessarily complexity). I think the industry might have jumped into Nanite and all the adjacent tech way too eagerly.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#202
Unless there's an actual financial metric to hit: no.

For most people; computers just suck now.

I work in AAA video games, and I'm often told that consoles hold back games. This is true in the most essential sense: for consoles we are forced by the first-parties to optimise our games so that they function on consoles at a reasonable framerate with not hitches.

Those optimisations help PC players too; and they have more hardware headroom so they can crank things up even higher: without those constraints games would be much heavier and would require you to be on a faster moving hardware cycle.

The same is true when I worked in ecommerce; there was a common verbiage which I don't remember verbatim but the spirit of it was "we lose 10% conversion every 100ms" - so we built our systems to do as much as possible within 100ms (including network RTT).

If people actually have target hardware, and a metric that they're pushed towards, it can happen, people can learn how to navigate the abstractions or do better with the abstractions they have... but I think this wont happen, because in the examples above there was an actual cost to things. Conversion rate is money, not being permitted to launch on console is money.

But you know what modern MBAs see as being money? Time to market & developer salaries. If every company has the same mentality: then it doesn't affect conversation in the same way. Those exogenous constraints simply don't exist in the majority of technology today. It's like a collective action problem.

If there was going to be a collective action against this for financial reasons we would have seen it, shipping laptops with 16G of RAM instead of 4G (or 8G) has a really large headline cost in a company of a few thousand people; but those companies never pushed hard on Teams or Slack.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#203
post #37
post #2

Programmers won't, but LLMs will.

We're in this situation because of laziness. I doubt doubling down on it is the solution.

Programmers will just /goal the LLM to make the code more memory efficient. Then let it run it run overnight.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#204

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.

> trade time-to-market for hardware cost Enh. I think this only exists for some programmers, who can't write good code fast.

Fast, correct, maintainable. Pick two.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#205
post #27

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…

> If that happens, we will see it in triple-A games first. If some new titles have significant lower hardware specs than expected. Recently I booted up Insurgency: Sandstorm. With a 5800X and an Intel Arc B580 at 1080p and high graphics, the game runs at around 200 FPS. Meanwhile, pretty much any modern UE5 title (with the exception of Ready or Not and Split Fiction, from what I've seen) runs horribly - the interesti…

>There's no good technical reason for things to be that way

Of course there is. What people gets presented is look how new graphics is shining. What devs get presented is look how much less manual work you need to get this graphics out of the door. Look at any UE5 presentation aiming at devs. You will be able to see a lot of 'just do this and technology will handle the rest of it'. There is no going back to manually making 3-5 replacements for each and every thing in the game. And the same goes for lights every few meters of a game world.

As a gamedev I don't really care about the regular software. You can see that the main problem for devs is to get paid for it. All kind of schemes with subscriptions and online services and such were tried. People just don't want to pay for the software. The mentality is 'we will get it for pennies on a sale' is the same like with the steam sales. Or even worse people will choose 'free' version with 'promotions' and data collection and whatever else that saves them pennies. Look at 'free to play games' steam category for the example of the horror show.

Oh and I don't think devs are the saints there. You can find a lots of examples that prey on gullible customers or trick people to buy 'digital goods' they don't need or outright bad things with gambling addictions and more.

The only thing consumer can do is to only vote with their wallet and push their representatives to regulate. The stop killing games is an example of the latter. The former is often deemed inefficient but Imho it is the only thing that will separate surviving studios and the shattered ones. As you may see in the press the names and past successes don't save studios from closing their doors now.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#206

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…

[deleted]

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#207
post #176

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…

You can drain all the system RAM with a tiny binary, so I am not sure you used the right metric.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#208
In particle physics, processing jobs face a limit of about 2GB/core. This is driven by the realities of "grid computing". The hardware in the computing facilities have approximately 2GB/core and jobs allocate based on number of core. This ratio has been fairly stable for a long time. Some facilities may have a bit more RAM per CPU core but 2GB/core is the general rule of thumb. I hazard a guess that this will not change throughout the (hopefully small number of) years that this memory cost bubble persists. In fact, the increase in cost may lead some facilities to keep older hardware going beyond its EOL/warranty period, prolonging a ratio that may actually be relatively generous compared to today's hardware systems.

As a consequence of this fixed RAM/core ratio, substantial software development effort goes to either making jobs fit in 2GB or if that is not possible then to utilize multithreading. Generally, particle physics processing does not particularly benefit from MT except in this fixed RAM/core situation. Sometimes large memory jobs are needed (inherently or because of bloat that is too costly to improve). When run on the "grid", these jobs must allocate multiple cores just to get "their" memory. If those jobs can use the extra cores, overall throughput does not have to suffer.

That's for conventional software, which still makes up the bulk of the computing. The situation for the growing amount of GPU-accelerated software is different and more varied. One trend can be seen relating to VRAM. Research groups with easy access to big GPUs like A100 write code to fit or exceed the relatively copious VRAM limits of the data-center GPUs, while groups that lack easy access to DC GPUs but have access to more modest "gamer" GPUs write more advanced software that can fit the smaller VRAM. In some cases, they write the software so it can scale the computation, keeping GPU utilization high while staying just under the VRAM limit.

General budget crisis and limited resources in the particle physics field are in part responsible for all of this tailoring of the software to fit the hardware. If better funded, particle physicists could spend more time doing physics and less time squeezing last drops of processing power.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#209
"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.

Re: Ask HN: Will programmers write more efficient code during the memory shortage?

#210
post #74

Earlier quoted context omitted.

Is there a single example of a successful LLM project apart from Claude Code?

If the CEOs are to be believed, then 75% of all new code in Google is AI generated. 46% of GitHub internal code, and roughly 30% across all of Microsoft is AI. Meta expects at least 65%, and snap reported 65% is AI generated. Its how software is built now in these palces.

99% of my new writing is generated by scigen, but 0% of my successful writing.
Post reply on HN