Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
“慢 X%”的数字是如何计算的?我想也许是:
(fastest - slower) / fastest
但在这种情况下,那就是:
(672555 - 194412) / 672555 = 0.7109351651537792
也许也使用了误差范围?
见https://github.com/bestiejs/benchmark.js/blob/7fc4c3cf7c4bccff4dbce58883a4181c2e830f85/example/jsperf/ui.js#L556:
percent = (1 - (hz / fastestHz)) * 100