3 ms·
> For most code, you don't know how fast it "ought to" be, so you don't even know there is a problem. Notable exceptions being realtime audio and video games,
by spacechild1 6y ago
> For most code, you don't know how fast it "ought to" be, so you don't even know there is a problem.
Notable exceptions being realtime audio and video games, as both have a rigid time budget. If I try to run 1000 sinewave oscillators, I can literally hear if my code is too slow (for the given machine).
- ncmncm 6y agoWhen you have a deadline, you get a bright line between "fast enough" and "too slow", and no immediately apparent benefit from being faster than just enough. In such cases, if it is known more work could be done, often more work can be found to do, but it is hard to know without actually trying to do more. If it is not certain the extra work could be finished in time, it might be wrong to start it instead of doing something else simpler and more certain.