阅读背景:

Javascript:为什么这个基准测试显示array.shift()在读取数组中的值时比array [i]快得多?

来源:互联网 

A quick question only. I created the benchmark (link below), and for me at least (running chrome 18.0.1025), reading values from the front of an array using array.shift() each time seems remarkably faster than reading the values using a while/for loop and accessing them by index.A quick question only. I created the benchmark




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: