[英]Why is Lo-Dash _.each faster than Boiler.js _.each and Underscore.js _.each?
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? 还没有时间检查Lo-Dash代码库(非常详细-工作使我花了很多时间),我想知道是否有人可以向我解释一下Lo-Dash的
_.each
方法如何执行其他库的等效项?
Google is your friend, young grasshopper: http://kitcambridge.be/blog/say-hello-to-lo-dash/ Google是您的朋友,年轻的蚱hopper: http : //kitcambridge.be/blog/say-hello-to-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避免使用浏览器本机方法来支持简单循环,这奇怪的是在大多数情况下速度更快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.