开发者

Run time optimisation in Javascript

Do the 开发者_如何转开发main Javascript interpreters have any built in optimisation at all? I'm thinking of very simple cases like

while(i < array.length) { ... } 


your code can be optimize, if that's what you're asking.

var ln = array.length; // save length into local variable to reduce scope
while(ln--) { ... }  // only one value is evaluated in while statement
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜