|
|
|
|
|
by vickychijwani
3569 days ago
|
|
The author answers this in the comments [1]. > Functions are also first class objects with observable identity, just like any other object. Identity can be observed in many ways, for example by doing an equality comparison or assigning a property. In the first example optimization is indeed possible as it's easy to see that the functions cannot be used for their identity. Optimizations have maintenance costs however and if similar simple scenarios are not common in the real world the optimization might not be worth implementing. [1]: https://reaktor.com/blog/javascript-performance-fundamentals... |
|