Yet another attempt at typed JS data

Michael Haufe tno at
Mon Feb 10 20:21:16 UTC 2020

//  [empty × 3]

// [undefined, undefined, undefined]

// ["whatever", "whatever", "whatever"]

-----Original Message-----
From: es-discuss <es-discuss-bounces at> On Behalf Of Bergi
Sent: Monday, February 10, 2020 1:27 PM
To: es-discuss at
Subject: Re: Yet another attempt at typed JS data


> Unfortunately, `Array.from({ length: 4 }, () => whatever)` produces a 
> holey array

Does it? But really, if the performance difference betweeen HOLEY and PACKED arrays were large enough to be relevant[1], the engine programmers would certainly already have optimised all those trivial cases where an array is filled gradually to produce the more efficient representation.

kind regards,

[1]: it probably isn't:
es-discuss mailing list
es-discuss at

More information about the es-discuss mailing list