Open icykoneko opened 3 years ago
LoDash is definitely not a complete mirror of Underscore. It took quite a while to get all the differences sorted out, and ended up in a lot of code churn, particularly with how _(iteratee).func(...)
and _.func(interatee, ...)
work... After getting it working, I wasn't really able to show LoDash providing any significant speed up.
Given how different the API is, I'm going to lower the priority on this, but not completely close it, not yet at least.
I've pushed the current working branch that incorporates LoDash instead of Underscore. For now, I'm going to leave this as a branch and try to regularly rebase it with master. Please keep that in mind if you want to mess around with it.
As of now, it appears to initialize the site about 7.7% faster, which is quite nice, but given how much code churn was required, and the syntax, I'm not really ready to switch over just for that.
Did some more testing, and I still get better performance with lodash vs. underscore. The slightly less pretty code may be worth switching over... Since this issue's main reason is optimization though, I'm going to continue exploring other bottlenecks first.
Underscore is slower sadly, and LoDash seems to offer a mirror of API. Really, the codebase could use an audit of its sequence manipulation routines. This may be a point of performance loss.