TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Can I ask for your help with testing some js loop syntax?

3 点作者 arash_milani超过 12 年前

2 条评论

michaelw超过 12 年前
I gave this a try and added the functional form (i.e. bigArray.forEach).<p>I was a little surprised at how much slower this was. I ended up creating another test where every case had a function call overhead. All three functional forms (forEach, map and reduce) were slower than the plain old loop<p><a href="http://jsperf.com/am-js-loops/7/edit" rel="nofollow">http://jsperf.com/am-js-loops/7/edit</a>
评论 #5127865 未加载
arash_milani超过 12 年前
There are various articles on the web that you can improve your javascript loop performance by modifying the way you code them. I wanted to know what is the current state for these techniques due to improvements in browser engines.<p>Thank you for your time.