On Thu, Jul 17, 2014 at 1:35 AM, Jan de Mooij <[email protected]> wrote:
>
> ArrayObject::EagerAllocationMaxLength (currently 2048) determines when
> |new Array(length)| will eagerly allocate. Maybe if it's > 2048 we
> could allocate a bit more than 10 elements..

Thanks! I've written a patch so that it allocates min(length, 2048)
elements. It's in bug 1040593.

> On Thu, Jul 17, 2014 at 8:40 AM, Nicholas Nethercote
> <[email protected]> wrote:
>> On a related note: ObjectElements::VALUES_PER_HEADER is 2. Is this
>> because 2 * sizeof(HeapSlot) is 16 bytes, which is equal to
>> sizeof(ObjectElements)?
>
> Yes that's correct.

Thanks again. I've added a comment and a static assertion about this
in my patch in bug 1039965 (which also fixes the large amounts of slop
we currently get with JS arrays, saving 10s or 100s of MiBs in some
real-world cases).

Nick
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to