JSPerf breaks when evaluating toggle() variations
Closed this issue · 1 comments
jhfrench commented
While testing my answer to Adding HTML5 hidden attribute support to jQuery .toggle() method1, I created a JSPerf test (http://jsperf.com/hidden-premium) to determine how much slower .toggle(function() [...]) would be compared to .toggle(). To my amazement, the script with additional processing is reported to execute faster! Besides the results being counter-intuitive, I suspect a problem because I also see the toggling on the screen long after the results have returned.
How can I "fix" my test to get accurate results?