Honestly, Linux distros ( CatchyOS in my case) are getting so good at managing ram that now i’m just curious to know if i could use that extra free ram to remove some work load from my old pc cpu.
Honestly, Linux distros ( CatchyOS in my case) are getting so good at managing ram that now i’m just curious to know if i could use that extra free ram to remove some work load from my old pc cpu.
Pre-calculation or calculation caching is about the best save you’re going to get, but each and every piece of software would need to be rewritten with that idea in mind - assuming it wasn’t already written that way in the first place - rather than it being something the system can impose.
It’s plausible that someone could write or modify an OS that specifies to each program what they’re supposed to do, be that optimise for time, optimise for CPU, optimise for RAM, etc. etc., but the program itself still needs to provide the ability to do each and every one of those, which is time and effort that program writers may not be willing to put in.
For a more concrete example, although still something of a toy, there’s a program in the
bsdgamespackage calledprimesthat’s ~80k in size.Clearly, at that size, it does not contain all prime numbers but it sure can generate more than 80k of them quickly. It is highly optimised code, if my efforts at beating it are anything to go by.
If you, as a hypothetical prime number aficionado, wanted even less work on your CPU, you could store your database of prime numbers in RAM (or disk) and not generate them over and over with
primes.primesdoes not do this. It is not written to do this. It could be, but then it would be a larger program to account for extra modes of operation, which is more work for the maintainers.