3 ms·
The key part that seems to be ignored by everyone who quotes Knuth is: "Yet we should not pass up our opportunities in that critical 3%"
by iamflimflam1 3y ago
The key part that seems to be ignored by everyone who quotes Knuth is:
"Yet we should not pass up our opportunities in that critical 3%"
- n4r9 3y agoExactly. He's not saying "don't think about optimisation until you've written all your code". He's saying "don't try to optimise until you know where it's needed the most". In many cases that does mean write a minimal implementation first. However in some cases knowledge, experience and early profiling will give you some pointers before that.
- wredue 3y agoHe also didn’t mean to write known to be shitty, slow code, and yet, we have an entire communities of programming paradigms that argue you should do just that, arguing that “premature optimization” is anything that “doesn’t feel fast enough”. What is the definition of “fast enough”? It’s impossible to tell because for those exact same people, they got their guns cocked and ready to fire a “HArDWarE is ChEApER tHAn DEvEloPErs TiMe!!!!!1!1!1!1!1!!” At you the moment you suggest that maybe needing an entire 32 core Xeon server with a tb of ram to serve 20 requests a second is MAYBE in need of optimization.