4 ms·
Great read. It's dangerous to overlook the practical aspects of the real-world hardware on which the code runs and over-index on the theoretical optimization.
by lxe 6y ago
Great read. It's dangerous to overlook the practical aspects of the real-world hardware on which the code runs and over-index on the theoretical optimization.
Your convoluted O(1) implementation can be slower than a naive O(n) one if you're doing something practically time-consuming.