Hidden classes - alexanderteplov/computer-science GitHub Wiki
V8 hidden classes
The V8 engine has this optimization feature.
To more efficient work with classes dynamic properties V8 creates intermediate classes: every time you add a new property in run time V8 cashes a new (hidden) class and the reference to it (if there isn't already such cashed sample).
So, if you add the same properties in a different order - there will be different classes in a cache chain. This affects performance.