3 ms·
Might wanna add 2014 to the title? Now that we have ES2015, I wonder if there's any performance difference between using a function and a class, even though cl
by TheAceOfHearts 11y ago
Might wanna add 2014 to the title?
Now that we have ES2015, I wonder if there's any performance difference between using a function and a class, even though class is "just sugar" over prototypes.
- noobermin 11y agoA relevant question is whether the newest version of v8 is any better than it was a year ago with respect to these issues.
- mraleph 11y agoES2015 class does not provide you with a way to declare instance fields. You still create them imperatively in the constructor. Which means for the purposes of the post ES2015 classes are not different from standalone constructor functions - as VM still has to figure out optimal layout dynamically.