On Thu, Jul 17, 2014 at 8:34 AM, Nicholas Nethercote <[email protected]> wrote: > Oh wait. It depends on the value of |length|. If it's 2050 or less, > then the right-sized array is allocated immediately. Otherwise, it > allocates 10 elements and then does the doubling thing. I guess > there's a limit to how much we'll pre-allocate.
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.. 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. Jan _______________________________________________ dev-tech-js-engine-internals mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

