On 2014/06/24 23:06:23, arv wrote:
On 2014/06/24 at 23:00:42, danno wrote:
> I suspect this will be much faster than allocating the entry in the runtime and the array allocation will get folded into the entry literal allocation in
optimized code.

That is good to know. So, even with the extra .value, it is preferred to put
the
array in the object literal?

You can separate it out and make it two literals, too, probably it's worth
micro-benchmarking to measure what's better, e.g.

var value_array = [UNDEFINED, UNDEFINED];
var entry = { value: value_array, done: false };
...

Just make sure both allocations are done before the runtime call, otherwise they
can't be folded together (allocation folding will also work with separate
objects as long as we can prove there is no GC between).

It would be good to get back to one runtime function again so it seems like a
good plan.


https://codereview.chromium.org/355663002/

--
--
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to