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. Is such a behavior already > implemented? > > Thanks!
I'm fairly sure it's not. Array#map() is currently implemented as a simple function in src/js/array.js, with no attempts to pattern-match call sites like V8 does for Math functions. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.