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.
我对 jsPerf 做了一个小测试。
为什么简单的Math.pow比缓存更快Math.pow (var pow = Math.pow)?
Math.pow
Math.pow (var pow = Math.pow)
为了正确比较删除
var pow = Math.pow;
从测试循环中,并将其放在准备代码中。
见http://jsperf.com/bt4r9-test-pow/2