Message from JavaScript discussions

October 2018

— The speed is from object structure cache

— 

V8 tries to cache that information, and if it changes (such as while you add props in a factory) there is additional overhead needed for a lookup as cache misses occur

— It gets worse if you change the structure of the hot prototype

— __proto__ I mean

— But for regular objects it is not noticeable really

— Let me know when you post results!

— There is no reason you can not access this in an arrow function, but it does behave differently... not respecting bind/call is one difference, and the other is that the call does not look left. In a method call that is how this is set, by quite literally looking to the left of the dot in the memberExpression

Message permanent page

— So, this will be whatever it was set to in the parent scope

— It can sometimes be useful to not allow this to change in your functions when you are setting up nested callbacks

Message permanent page

— It can be an easy way to allow this to be “inherited” as a factor of variable scope

— Hey

— I want to start with js