1. 24 May, 2019 1 commit
  2. 08 Oct, 2018 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Introduce the notion of context-sensitivity for JS operators. · 51274d3c
      Benedikt Meurer authored
      This change adds predicates to check whether a given JavaScript operator
      needs the "current context" or if any surrounding context (including the
      "native context") does it. For example JSAdd doesn't ever need the
      current context, but actually only the native context. In the
      BytecodeGraphBuilder we use this predicate to check whether a given
      operator needs the current context, and if not, we just pass in the
      native context.
      
      Doing so we improve the performance on the benchmarks given in the
      tracking bug significantly, and go from something around
      
        arrayMap: 476 ms.
        arrayFilter: 312 ms.
        arrayEvery: 241 ms.
        arraySome: 152 ms.
      
      to
      
        arrayMap: 377 ms.
        arrayFilter: 296 ms.
        arrayEvery: 191 ms.
        arraySome: 91 ms.
      
      which is an up to 40% improvement. So for idiomatic modern JavaScript
      which uses higher order functions quite a lot, not just the builtins
      provided by the JSVM, this is going to improve peak performance
      noticably.
      
      This also makes it possible to completely eliminate all the allocations
      in the aliased sloppy arguments example
      
      ```js
      function foo(a) { return arguments.length; }
      ```
      
      concretely we don't allocate the function context anymore and we also
      don't allocate the arguments object anymore (the JSStackCheck was the
      reason why we did this in the past, because it was holding on to the
      current context, which also kept the allocation for the arguments
      alive).
      
      Bug: v8:6200, v8:8060
      Change-Id: I1db56d00d6b510ce6337608c0fff16af96e95eef
      Design-Document: bit.ly/v8-turbofan-context-sensitive-js-operators
      Reviewed-on: https://chromium-review.googlesource.com/c/1267176Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56441}
      51274d3c
  3. 17 Oct, 2016 1 commit
  4. 03 Aug, 2016 1 commit
  5. 20 Apr, 2015 1 commit
  6. 09 Mar, 2015 1 commit
  7. 23 Dec, 2014 1 commit
  8. 29 Oct, 2014 1 commit
  9. 04 Sep, 2014 1 commit
  10. 01 Sep, 2014 1 commit
  11. 21 Aug, 2014 1 commit
  12. 18 Aug, 2014 1 commit
  13. 07 Aug, 2014 1 commit
  14. 30 Jul, 2014 1 commit