|
|
|
|
|
by cogman10
1486 days ago
|
|
Adding methods to prototypes is effectively free. The only time mutating a builtin prototype has negative consequences is when you replace a builtin function with your own thing. All javascript engines (that I'm aware of) JIT at the method level so there's not really a performance impact modifying a prototype. |
|
It seems this only pertains specifically to overwriting the __proto__ of an existing object (the is the prototype of other things).