50 ms·
it's probably time to call those old retired programmers to ask them how to reduce software memory footprint or to teach that again
by jokoon 6mo ago
it's probably time to call those old retired programmers to ask them how to reduce software memory footprint
or to teach that again
- rat9988 6mo agoThe art is not lost, just not funded. Feel free to fund the programmers for your own software projects.
- kitsune1 6mo ago[dead]
- tempest_ 6mo agoIt isnt lost but it also isnt a common skill set in programmers any more. Most programmers are JS web devs writing client side code or server side CRUD. I would guess < 10% of programmers writing code today get perf / valgrind out on the regular. I know I dont.
- siruwastaken 6mo agoMost people don't have the chance to do that, but hopefully we can see some other languages get first class access on the web. At least there is the whole WASM project.
- zozbot234 6mo agoYou can still write JS or TypeScript code that tries its best to keep memory use under check. JavaScript was around in the late 90s when the memory footprint of software was at least an order of magnitude lower, so it's absolutely doable.
- tempest_ 6mo agoJavaScript in the late 90s was doing a hell of a lot less than it is today.
- Quothling 6mo agoYou don't have to go that deep. 99% of the time our analytics or risk management teams have some really memory inefficient Python and they want me to write them one of our "magic C things" it turns out to be fixable by replacing their in-memory iterations with a generator.
- benjiro3000 6mo ago[dead]
- zozbot234 6mo agoJust rewrite your biggest memory hogs in Rust, it routinely slashes RAM footprint and demand for RAM throughput. The effect is even bigger than the typical reduction in CPU use. You can even ask AI to help you with the task, it will use a lot less RAM for it than the rewrite will save down the road.
- IncreasePosts 6mo agoWhy would we need rust, if the AI can just write really good code in C that doesn't exhibit any of the issues that rust protects you from?
- msy 6mo ago'rewrite in C, make sure there are no memory leaks'. You first.
- IncreasePosts 6mo agoWhy is that less realistic than saying 'rewrite in rust, make sure there are no memory leaks'? My point, which I should have been clearer with, is that we aren't at a state where you can just one shot a rewrite of a complex application into another language and expect some sort of free savings. Once we are at that state, and it's good enough to pull it off, why wouldn't the AI be able to pull it off in C as well?
- throwaway173738 6mo agoThere are classes of bug that are easy to write in C that are impossible to express in Rust.
- davemp 6mo agolet foo = [1, 2, 3]; unsafe { *foo.get_unchecked_mut(4) = 5; } Not sure why Rust evangelists always seem to ignore that unsafe exists.
- whynotmaybe 6mo agoI can save everyone a few Mb of memory now : 1. Check that you really need a SaaS SPA to solve the communication issues between your team members. 2. HTML and css should be enough for 99% of corporate websites. 3. Resize the images on your websites, they're too big. 4. Use teams in the browser, not as stand-alone app.
- deleted 6mo ago[deleted]
- nostrademons 6mo agoThis is happening, sort of. All the big tech companies have major initiatives going to reduce RAM usage. The old graybeards who know how to optimize efficiency may not work for them anymore, though.
- josephg 6mo agoTaking a big, complex, already well optimised program like Chrome or the linux kernel and optimising the memory footprint is hard. But 90% of programs are just crappy web apps that nobody has even bothered to optimise at all. (Sometimes wrapped in electron or something.) If you go look, you often discover that 90% of the requests are useless, or at least could be combined. That 60% of bandwidth is used up by 3 high res images which get displayed at 30x30 pixels. That CPU performance is dominated by some rubbish code that populates an array of a million items every call, then looks up 1 element then throws the whole thing away, only to regenerate the exact same list again a few microseconds later. We have plenty of RAM. In absolute terms, 8gb of ram in the macbook neo is 8 billion bytes. 64 billion ones and zeros. You don't need rocket science to make a CRUD app that runs well with that much ram. Computers don't get slower over time. If we were merely as lazy with computing resources as programmers 10 years ago, most programs would scream on modern hardware.
- JollySharp0 6mo agoIt isn't that they are crappy web devs. It is that often the org paying for the development doesn't care. I am a web developer of over 20 years. I can create insanely optimised pages using nothing other than vanilla CSS and JS. I have been paid exactly once to do this. There is a site I built in 2023 that has a JS and CSS footprint of less than 100KB after GZip (large site). We even had the Go templates compiled when the web app initialised so the server responded as fast as possible. Guess what happened when it went live? The content team use 8mb images for everything and every single optimisation I did at CSS/JS was totally useless. Devs don't care because the people above them don't care and therefore there is zero incentive to even bother.
- josephg 6mo ago> therefore there is zero incentive to even bother. I hear you, and this is a real problem. But it's kind of depressing to need incentives to care about the quality of your work.
- JollySharp0 6mo ago
- manicennui 6mo agoWhy not ask your LLM?
- gib444 6mo agoYou can surely trust the wolf in their brick house knowledge
- autophagian 6mo agoSeems unnecessary. We can simply ask the LLMs to do it after, of course, imploring them to not make any mistakes.
- mark-r 6mo agoThat's circular logic. It's the demand from LLMs that are driving the DRAM shortage.
- Waterluvian 6mo agoThis feels kind of worn out. Yes we use more memory but we have more to work with. At the very worse you just let your favourite LLM take a pass at improving memory usage. For example, yesterday I was debugging an Electron crypto mining blockchain 2.0 app and the WebWorkers wou—- ?OUT OF MEMORY ERROR IN 0 READY. >
- bitwize 6mo agoNonsense. You prompt an adversarial agent to look for bottlenecks and suggest improvements in what your coding agent wrote, "and don't make mistakes".
- reenorap 6mo agomemmaker for the win!
- hrmtst93837 6mo ago[flagged]