42 ms·
This is a bit misguiding however, since the `n` here represents the total amount of RAM on the system, not the one used by the algorithm.
by SkiFire13 1y ago
This is a bit misguiding however, since the `n` here represents the total amount of RAM on the system, not the one used by the algorithm.
- gpm 1y agoEh... if the algorithm is dominating your apps runtime the data it loads is probably in the fastest storage device you have that fits. Whether that's L1 cache or a cluster of a dozen computers each with a TB of ram. If not, you can probably optimize by making that the case. At which point `n` is actually the size of the data for the slow algorithm. I agree you don't often care about this scaling factor though, the O(1) random access ram model gets you pretty far and after that you're probably interested in optimizing for some specific data size anyways.