Summary

In this chapter, we introduced some of the influences that guide the design and implementation of Lo-Dash. Earlier versions of the library opted for function compilation, building the functions on the fly to best handle performance and other variations from environment to environment. Recent versions have traded this approach for common base functions. Function compilation avoided some of the indirection associated with base functions. However, modern browsers have a JIT optimizer. It is better able to optimize base functions. Besides, the code is much more readable with base functions.

The golden rule of the implementation of Lo-Dash is optimization for the common case. You'll see this rule in action all over Lo-Dash, and it is the key ...

Get Lo-Dash Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.