Chrome V8 Optimization Compiler
Is there still a difference between Monomorphism, Polymorphism, and Megamorphism in speed, or not anymore?
Monomorphism => [{a:47}, {a:5}, {a:9}];
Polymorphism => [{a:1, b:65}, {c:22, a:57, d:8},{e:14, a:819}];
...
(V8 developer here.)
Yes, and it's safe to assume that there always will be.
What's much harder to say is whether it matters for your application.
For instance, it depends on what you're doing. Putting different kinds of objects into an array doesn't make any difference at all; only accessing those objects' properties afterwards encounters the concept of polymorphism (e.g. if you have for (let o of array) { o.a = 42; }
elsewhere -- the array doesn't care, the o.a
part does).
Also, an effect that's clearly visible in a microbenchmark might only affect a large real-world application within the noise range (say, 1% or less). So it's usually not worth worrying about this, unless you have specific reason (such as: profiling results) to believe that it may be a problem in your case.