Why is lodash _.each faster than the native for loop?
问题 JSPerf says the native for loop is the fastest of all similar loop implementations. However, I tried a simple example here -https://jsbin.com/kivesopeqi/edit?html,js,output where _.each is way faster than the native for loop. Can someone help me understand why? Or point out something wrong with my example? 回答1: First you have to have to make sure that you don't compare apples and oranges. When I try the code, jsbin will stop the code in the middle because it thinks that there is an infinite