Comment #1 on issue 1451 by [email protected]: Array.forEach, filter, some, etc. are not special-cased for sparse arrays.
http://code.google.com/p/v8/issues/detail?id=1451

The reason they loop without attempting to special case for sparse arrays is that the callback function can add elements to the array being iterated. These are supposed to be included in the iteration. Therefore we cannot compute the indices up front as we do with other array methods. We need a mechanism to bail out when an element is added.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to