4 ms·
In my average view, Knuth was wrong about optimization. Not technically, but because the vast majority of people writing software took "premature optimization i
by hindsightbias 7y ago
In my average view, Knuth was wrong about optimization. Not technically, but because the vast majority of people writing software took "premature optimization is the root of all evil" to be "optimization is the root of all evil."
I have a long list of encountering software doing things like reading a billions of rows with getline() in C++. That can be a problem [1]. It doesn't matter how good a heapsort is if it's blocked on some architectural primitive and we'd do better to teach to that optimization in CS 101 than sorting.
1. https://lemire.me/blog/2019/06/18/how-fast-is-getline-in-c/ https://lemire.me/blog/2019/06/18/how-fast-is-getline-in-c/