Currently, calling Array.fill will produce an array with HOLEY elements. > %DebugPrint(Array(1).fill(0)) DebugPrint: 0000015DF1C8CF29: [JSArray] - map: 0x00280f5cf721 <Map[32](HOLEY_SMI_ELEMENTS)> [FastProperties] - prototype: 0x02f93035a851 <JSArray[0]> - elements: 0x015df1c8cf49 <FixedArray[1]> [HOLEY_SMI_ELEMENTS] - length: 1
This seems like a missed opportunity for optimization since the new array could be upgraded to PACKED_SMI_ELEMENTS. There's a very old issue about this https://issues.chromium.org/issues/42210138 which hasn't collected any objections. I'd be a first time contributor to V8 but I'd be happy to try patching this. All advice would be welcome! Ben Kietzman -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/77180799-00e5-402b-b99d-727039dc409cn%40googlegroups.com.
