3 ms·
"Just as businesses try desperately to avoid tying up capital in inventory, a programmer's job is to think like a factory boss, treat RAM as capital, and avoid
by gulbrandr 15y ago
"Just as businesses try desperately to avoid tying up capital in inventory, a programmer's job is to think like a factory boss, treat RAM as capital, and avoid consuming any of it. "
I found this analogy excellent.
- cageface 15y agoThis seems a little backwards to me. Wouldn't you want to make sure you're using every possible byte? Isn't this why Linux essentially uses all available ram for I/O caching? Obviously you don't want to waste memory, but if it's sitting there unused you're probably missing some caching opportunities.
- dspillett 15y agoYes and no. You want to use as much RAM as you have available, but for data not code. You want your code, including the framework it is using, to take as little RAM as possible - then there is more available for data (either held specifically in your structures or cached/buffered by the OS to avoid I/O operations).
- JonnieCache 15y agoYou should be utilising the maximum amount of the RAM that is available, while still requiring a minimal amount for the thing to run fast.