Performant JavaScript

If you need to share functionality across instances of a class, it is massively more performant to share functionality via prototypes.

This was a huge takeaway from yesterday’s lecture by @sgharms at Dev Bootcamp on inefficient versus efficient method sharing in JavaScript.

Using JS prototype functions to share functionality amongst instances of a class is significantly more performant and uses less memory than encapsulating shared methods in the constructor function.

Who knew.

 
2
Kudos
 
2
Kudos

Now read this

The Seven Spiritual Laws of Success

The following notes were taken while reading The Seven Spiritual Laws of Success by Deepak Chopra. They reflect key takeaways and reminders from each chapter. The Law of Pure Potentiality Judge nothing that occurs. The Law of Giving Give... Continue →