2 ms·
> It really seems to me like you don't understand the advice about premature optimization. This is it, this is what Knuth is talking about. Profiling everything
by godelski 1y ago
> It really seems to me like you don't understand the advice about premature optimization. This is it, this is what Knuth is talking about. Profiling everything, optimizing everything. That's premature optimization
You greatly misunderstand what I'm saying
1) profile your code
2) optimize what needs to be optimized
3) there is no step 3
Why did you suddenly assume I said you should optimize everything? We don't have infinite time on our hands
- sfn42 1y agoBecause one does not just profile their code. It branches, different parts do different things. You need to run the code with sensible input, multiple different inputs to hit the different branches etc. If you have a good workflow that includes profiling your code that's cool, it's probably a good way to improve the performance of your code. But personally I think it's enough to test the code and make sure it works and is reasonably fast. I'm not going to spend time eliminating nano and low digit milliseconds. If something actually keeps users waiting I'll look into it. As long as it's near instant it's good enough for me.