3 ms·
No. No. No. It doesn't matter. Not one bit. Exception: for FF maintainers, opera programmers. But ordinary javascript programmers never have to worry about a ms
by jd 18y ago
No. No. No. It doesn't matter. Not one bit. Exception: for FF maintainers, opera programmers. But ordinary javascript programmers never have to worry about a ms here or there.
Let me quote again from your blog post:
This was quite odd since the tests should've taken, at least, a couple milliseconds to run and getting consistent times of "0" is rather infeasible, especially for non-trivial code.
Conclusion 1: The code _is_ trivial! Why? it takes < 64ms to execute.
Conclusion 2: The actual time spent by the code doesn't matter, because you can't notice the difference between the reported 0ms and the actual 3ms or so that it takes to execute.
Next paragraph:
Second, I was running some performance tests, on Internet Explorer, in the SlickSpeed selector test suite and noticed the result times drastically fluctuating. When trying to figure out if changes that you've made are beneficial, or not, it's incredibly difficult to have the times constantly shifting by 15 - 60ms every page reload
Why does it matter if loads 15ms to 60ms faster/slower? It's not noticeable. And once you see that the difference is roughly 15ms a quick google search will reveal it's a simple timer accuracy issue.
So why the graphs? Why test different browsers on different platforms when the outcome can't be anything else than the 60ms fluctuations you've already seen? But you knew the second you saw a single time reported as 0ms that that the time accuracy is not on the 1ms precision level, which means that they use GetTickCount or something which has a 15ms precision.
> It certainly wasn't obvious to the WebKit, Firefox, and Chrome teams who were all happily testing on Windows XP using bum tests
If they used the tests they would've noticed the 0ms results. Therefore, they either thought 0ms means it's <15ms, which is fast enough, or they tested it primarily on other platforms.
I don't believe for a second that the WebKit, Firefox and Chrome teams have done ms comparisons with tests that don't report data on the ms level. 0ms results stand out, after all. They probably are pretty smart people, and they realized it doesn't matter.
> Any performance tests are better than no performance tests
Nope. Silly performance tests are worse than no performance tests.