阅读背景:

为什么数组。有时推得比数组[n] =值快?

来源:互联网 

As a side result of testing some code I wrote a small function to compare the speed of using the array.push method vs direct addressing (array[n] = value). To my surprise the push method often showed to be faster especially in Firefox and sometimes in Chrome. Just out of curiosity: anyone has an explanation for it? You can find the test @As a side result of testing some code I wrote a




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

分享到: