Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread Isiah Meadows
Question: would a call site optimization featuring pipelines work? Several Array prototype methods always return arrays, so that's why I'm thinking a pipeline would be feasible. It's probably not trivial to implement, especially considering lazy evaluation of a specific internal reference is

Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread Jakob Kummerow
Also ES6 is mostly a burden for JS implementations, not much of an opportunity. We have to invest some serious effort just to *maintain* previous performance as we're implementing ES6, and in some cases not even that is possible. On Fri, Mar 4, 2016 at 3:49 PM, 'Andreas Rossberg' via v8-users <

Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread 'Robert Eisele' via v8-users
Sounds reasonable, but wouldn't it make sense to make this pattern matching based on internal references (plus refcount) instead of variable-name matching? That would solve the issue probably. Above that, I agree that the limiting factors are based on function calls if it's implemented in a

Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread Jakob Kummerow
On Thu, Mar 3, 2016 at 7:48 PM, 'Robert Eisele' via v8-users < v8-users@googlegroups.com> wrote: > Hi, > > I wonder if v8 is able to optimize the pattern > > A = A.map(x => ~x) > > In this case v8 can work on the array instead of creating a new object and > replacing it with the original array. >

Re: [v8-users] Does v8 optimize map()?

2016-03-03 Thread Ben Noordhuis
On Thu, Mar 3, 2016 at 7:48 PM, 'Robert Eisele' via v8-users wrote: > Hi, > > I wonder if v8 is able to optimize the pattern > > A = A.map(x => ~x) > > In this case v8 can work on the array instead of creating a new object and > replacing it with the original array. Is

[v8-users] Does v8 optimize map()?

2016-03-03 Thread 'Robert Eisele' via v8-users
Hi, I wonder if v8 is able to optimize the pattern A = A.map(x => ~x) In this case v8 can work on the array instead of creating a new object and replacing it with the original array. Is such a behavior already implemented? Thanks! -- -- v8-users mailing list v8-users@googlegroups.com