LGTM
Lets get the right behavior first and then see what becomes hot.
https://codereview.chromium.org/1132723008/diff/20001/src/array.js
File src/array.js (right):
https://codereview.chromium.org/1132723008/diff/20001/src/array.js#newcode572
src/array.js:572: if (!IS_UNDEFINED(current_i) || i in array) {
On 2015/05/19 16:56:20, dehrenberg wrote:
On 2015/05/19 16:37:25, arv wrote:
> Add todos to remove the in checks for typed arrays.
>
> ...and also typed arrays cannot contain undefined or holes
>
> At this point reverse is probably better reimplemented.
All the array methods have tons of code to deal with holes. I don't
think it'd
be useful to sprinkle todos everywhere. I'm not even positive if all
of these
are performance-sensitive--for example, you could optimize join to not
handle
holes, but I don't think any program would get faster as a result.
What I've
been doing in this patch series is just getting methods to work at a
basic level
on TypedArrays, maybe the most useful part being that there are tests.
We will
optimize afterwards. I am not sure if reverse() comes up as something
that's
important to optimize, but we'll have to see by examining real
programs or
thinking about it more. In this particular case, I think the lack of a
cloned
method body would a much bigger performance effect than these little
conditionals on holes, but that's just a guess.
Very good point.
https://codereview.chromium.org/1132723008/
--
--
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.