Live data from Hacker News

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

news.ycombinator.com

191–200 of 264 posts

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

#191

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…

> I don't know what needs to change for things to get better. Studios need to start creating custom engines again, for one. We'll get better games with less unsatisfying jank, some of the projects will actually cost less (which is paradoxical to some) and performance is likely to jump significantly. Off-the-shelf engines have as many costs as they have benefits, but like a lot of technology people refuse to look at t…

Do you actually believe in what you wrote above?

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

#192
post #82

Earlier quoted context omitted.

Switch was notorious for having a few Cloud streamed-games that don't run on the actual hardware.

which ones were those? I want to check them out

The Switch 1 Kingdom Hearts game are like that.

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

#193

I don't believe so do for two reasons: - 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 o…

> the fact that programs and websites are delivered by large teams, there are dozens of submodules that are often loaded even when not needed

Precisely this. We had an incident once where a CSV had a postal code field be interpreted as an integer by pandas, which of course results in stripping any leading 0s. After looking at what the code needed to do, I asked why they were using pandas in the first place, as it was literally just “read the CSV as-is into a list.” Guess what Python’s stdlib csv module doesn't do? Type inference.

Instead of replacing the unnecessary pandas import (which brings along a fairly heavy transitive chain) with stdlib, they added additional code and tests to ensure this wouldn’t happen going forward.

Some devs learn by trying. Others learn by reading docs. Most seem to learn by reading blog posts that use unnecessary 3rd party packages.

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

#194
post #183

Earlier quoted context omitted.

The classic excuse for industry-wide incompetence. The average programmer today can't write good code even if told it's an explicit priority. The manager wants the Submit button to submit the form, they rarely care how the programmer does it. It's the programmer that chose to install the 11,000 node_modules, to use React with 3 layers of state management on top with hybrid SSR/CSR and to do Kubernetes because that's…

What is "good code"? If you ask your boss, it will most likely be whatever spaghetti code which ensures the contract gets signed on time. The boss doesn't care if the developer needs 10000 libraries for the submit button.

"The boss" is not who says what is good enough. Ultimately it's the customer. In many industries it seems good enough is not very good.

Then there are industries where the customer complains if code is slow. They will actually hire expensive consultants to analyze and benchmark the code. And while the consultants likely are not more talented than inhouse staff, now you have both sides very interested at looking at the problem from engineering perspective.

In this case "good" includes performance.

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

#195

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…

> I don't know what needs to change for things to get better. Studios need to start creating custom engines again, for one. We'll get better games with less unsatisfying jank, some of the projects will actually cost less (which is paradoxical to some) and performance is likely to jump significantly. Off-the-shelf engines have as many costs as they have benefits, but like a lot of technology people refuse to look at t…

Game studios should choose CryEngine/Decima again over UE5

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

#196

Earlier quoted context omitted.

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

Whatever you're already able to do, you can do it better with more time.

source?

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

#197
You don't save memory with code, you save it with architecture, platform decisions, and feedback loops.

Feedback loops are the important bit. If you want to reduce your service's memory footprint, don't at the code look at the memory profile and monitoring. You will find something like "oh shit 30% of our RAM is used by these buffers that we could basically eliminate if we tweak the flush frequency".

If you automate/regularise those investigations you will get an efficient service.

Same is true of every other performance metric, and reliability. It comes from your engineering processes (alerts, qualification, prod experimentation) not "write better code".

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

#198
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.

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

#199
post #74

Earlier quoted context omitted.

Especially when LLMs are used to generate most of the code anyways in bigcorps

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

Bun, Ghostty
Post reply on HN