You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One last follow-up: I installed d8 (debug v8) as suggested in the linked blog post.
$ ~/.jsvu/bin/v8-debug
V8 version 11.1.192
d8>
I was able to replicate their example:
constarray=[1,2,3];array[3]=4.56;
$ ~/.jsvu/bin/v8-debug --trace-elements-transitions test.js
elements transition [PACKED_SMI_ELEMENTS -> PACKED_DOUBLE_ELEMENTS] in ~+15 at test.js:1 for 0x0e520010b461 <JSArray[3]> from 0x0e520025a3c1 <FixedArray[3]> to 0x0e520010b471 <FixedDoubleArray[22]>
But if I initialize elements one-by-one, then the initial state becomes HOLEY_SMI_ELEMENTS.
elements transition [HOLEY_SMI_ELEMENTS -> HOLEY_DOUBLE_ELEMENTS] in ~+60 at test.js:1 for 0x02d60010b48d <JSArray[3]> from 0x02d60010b49d <FixedArray[3]> to 0x02d60010b4b1 <FixedDoubleArray[22]>
So unfortunately this is a sub-optimal initialization pattern on V8.
Follow-up to #4736
One last follow-up: I installed d8 (debug v8) as suggested in the linked blog post.
I was able to replicate their example:
But if I initialize elements one-by-one, then the initial state becomes
HOLEY_SMI_ELEMENTS
.So unfortunately this is a sub-optimal initialization pattern on V8.
Originally posted by @armanbilge in #4736 (comment)
The text was updated successfully, but these errors were encountered: