7 ms·
I just don't think this is true. A very common tradeoff we make is to cache the results of time consuming calculations in memory, or even cache raw data in mem
by SimonPStevens 8y ago
I just don't think this is true.
A very common tradeoff we make is to cache the results of time consuming calculations in memory, or even cache raw data in memory to avoid database calls. Both of these techniques increase memory usage, but improve performance.
- Narishma 8y agoThat depends on how expensive those calculations are relative to memory access. CPUs are very fast at doing a ton of math but very slow at reading or writing to random memory.
- SimonPStevens 8y agoYes, of course, but my point wasn't that if you cache all results your software will be faster. My point is just that it is possible to write code that consumes more memory, and runs faster under some circumstances, which refutes the ops claim that all software that uses more memory is slower.