News for hackers. Stuff that matters.
Re:Ask HN: What's the best tool you used to use that doesn't... by gmmeyer on Saturday May 14, 2016 @04:37AM (#11695121)
The best part of this: The native for loop is what lodash uses. It's the fastest way to do it.
Re:Ask HN: What's the best tool you used to use that doesn't... by bhouston on Saturday May 14, 2016 @05:02AM (#11695197)
The issue is the callback, it introduces significant overhead because it is a new context with its own scope on a per callback basis.
Re:Ask HN: What's the best tool you used to use that doesn't... by dclowd9901 on Saturday May 14, 2016 @12:37PM (#11696857)
Yes, exactly. I suppose if you registered the callback as a named function expression, a good js engine might be able to optimize on it and inline it, but I also don't like leaning on compilers so much.