为什么Lo-Dash _.each比Boiler.js _.each和Underscore.js _.each更快? [英] Why is Lo-Dash _.each faster than Boiler.js _.each and Underscore.js _.each?

查看:70
本文介绍了为什么Lo-Dash _.each比Boiler.js _.each和Underscore.js _.each更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Perf Test

尚未有时间审查Lo-Dash代码库(非常详细 - 工作让我时间紧张)我想知道是否有人可以向我解释他们的头脑如何Lo- Dash的 _。每个方法输出执行其他库等价物?

Having not yet had the time to review the Lo-Dash code base (in great detail - work has me pretty strapped for time) I was wondering if someone could explain to me off the top of their head how Lo-Dash's _.each method out performs other libraries equivalents?

推荐答案

谷歌是你的朋友,年轻的蚱蜢: http://kitcambridge.be/blog/say-hello-to-lo-dash/

Google is your friend, young grasshopper: http://kitcambridge.be/blog/say-hello-to-lo-dash/

总结:Lo-Dash避免使用浏览器本地方法来支持简单循环,在大多数情况下奇怪的是它更快。

In summary: Lo-Dash avoids using browser-native methods in favor of simple loops, which oddly enough are faster in most cases.

这篇关于为什么Lo-Dash _.each比Boiler.js _.each和Underscore.js _.each更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆