3 ms·
Depends if that 0.1 seconds is going to add up to a very significant amount. Obviously these are just tests but in a production system running 24/7 that 0.1 sec
by bithush 12y ago
Depends if that 0.1 seconds is going to add up to a very significant amount. Obviously these are just tests but in a production system running 24/7 that 0.1 seconds per run is going to add up to a lot. The code might be ugly but that is when comments are most important.
- pjc50 12y agoOr it might add up to next to nothing, if a full run is eight hours. Or it might finish early and then be blocked waiting for some other part of the system. The moral of "computers are fast" is that guessing about bottlenecks and twiddling with the lowest level of code is unlikely to help; you need to start at the top with a profiler, and start asking the questions "do we need to compute this at all?", "can we make it O(n log n) or better?", and "can we partition this to scale horizontally?"
- jononor 12y agoNot only at the top, but with profiling a task that is relevant for the user. It is trivial to find some code that could be "speed up", but if it does not bring any value to the user, what is the point?