Live data from Hacker News

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

news.ycombinator.com

261–264 of 264 posts

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

#263

Earlier quoted context omitted.

FWIW I work part time on projects that are all about reducing RAM usage server side! RAM has been a big expense in the cloud for a long time. AI makes the situation critical but there's a lot of work done already. Consider that functions-as-a-service are basically all about shutting down idle servers to reclaim their RAM.

FaaS are really interesting, because the tradeoffs seem "jagged" (to use a word I learned recently). Like, IIUC this is more or less what's happening when a cloud function is invoked: 1. Some event triggers the function (HTTP request hits load balancer or whatever) 2. A VM is loaded from NVMe (possibly on another computer, and transferred over the network) into RAM 3. That VM boots up 4. The function code runs 5. The…

> Naively, this probably takes a lot more RAM (not to mention all the other computing resources) than to just have another HTTP handler sitting idle on some computer somewhere.

CF Workers uses V8 isolates rather than (OS/HW-level) VMs.

Also, the RAM usage isn't really a differentiator between FaaS and any other cloud instance. If a VM is used for FaaS, it's almost certainly also used across the platform for multi-tenancy, invisible live migration, etc.

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

#264
For the people I work with, I'd say no to writing more efficient code, and maybe to using more advanced algorithms. I say maybe only because they'll just ask an LLM to make it more memory efficient. Which in theory will cause the LLM to choose a more advanced DS. But I don't have a lot of faith that the LLM will get said DS right all the time.

I work with dynamic language developers. Perl, React, Python and so on. Most currently don't care about memory usage. Some devs are actively wasteful. Usually in the name of code clarity or speed of delivery.

Post reply on HN