2 ms·
Of course, but the language spec severely limit what optimizations can be done. For example, V8 will happily give you a proper array if certain criteria is met
by arghwhat 8y ago
Of course, but the language spec severely limit what optimizations can be done.
For example, V8 will happily give you a proper array if certain criteria is met, but it must always be ready for you trying to index it with a string, which means that it must attempt to parse the string as a numeric value. This means deoptimization checks, or in the worst case, a non-optimized array.