I like it! I doubt it would slow things down much, but can you add a benchmark
for a non-packed case to see how much the extra branch costs us?

Note that there's a more complex version that works even for slightly-sparse
arrays:

if (%HasFastElements(array)) {
  var element = array[i];
  if (!IS_UNDEFINED(element) || i in array) {
    // do whatever
  }
} else if (i in array) {
  // normal path
}

This works because fast elements can't have getters.

https://codereview.chromium.org/22545007/

--
--
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/groups/opt_out.


Reply via email to