Lame.

We have a bug in reduce/reduceRight then because we use this pattern which
is observable.

Maybe %HasFastPackedElements is fine after all since that will be false if
we have a getter. Need to test a bit more.


On Fri, Aug 9, 2013 at 11:40 AM, <ad...@chromium.org> wrote:

> On 2013/08/09 14:24:06, arv wrote:
>
>> One more idea... taken from reduce
>>
>
>  Instead of doing the in check we [[Get]] the value and only if the value
>> is
>> undefined do we need to do an [[HasProperty]] check.
>>
>
>  ForEach: 184870
>> ForEach2: 367066
>> ForEach3: 452772
>> ForEachWithHoles: 123503
>> ForEach2WithHoles: 114547
>> ForEach3WithHoles: 110123
>>
>
>  This is 3x faster!
>>
>
>  The downside to both of these ideas is that with proxies it is detectable
>> that
>> the order no longer matches the spec.
>>
>
> It's not just proxies, it's also observable with getters. If you look at
> git
> blame, that's what the code used to do, and I think mstarzinger fixed it to
> match the spec.
>
>
>  Maybe these hacks are not worth it and we should just make [[HasProperty]]
>> fast... not that at will ever be as fast as ForEach3 since we always need
>> to
>>
> do
>
>> the [[Get]] no matter what.
>>
>
>
>
> https://codereview.chromium.**org/22545007/<https://codereview.chromium.org/22545007/>
>



-- 
erik

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to