v8/test/js-perf-test
bmeurer 07e163bd5a [js-perf-test] Add microbenchmarks for materialized rest parameters.
Functions that take mandatory parameters plus a number of optional
parameters, that need to be materialized as an Array are quite common.
The simplest possible case of this is essentially:

  function foo(mandatory, ...args) { return args; }

Babel translates this to something like:

  function foo(mandatory) {
    "use strict";
    for (var _len = arguments.length,
             args = Array(_len > 1 ? _len - 1 : 0),
             _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
    return args;
  }

The key to great performance here is to make sure that we don't
materialize the (unmapped) arguments object in this case, plus that we
have some kind of fast-path for the Array constructor and the
initialization loop.

This microbenchmark ensures that we have decent performance even in the
case where the assignment to args is polymorphic, i.e. the arguments
have seen different elements kinds, starting with FAST_HOLEY_ELEMENTS
and then FAST_HOLEY_SMI_ELEMENTS.

R=yangguo@chromium.org
BUG=v8:6262

Review-Url: https://codereview.chromium.org/2823343004
Cr-Commit-Position: refs/heads/master@{#44709}
2017-04-19 05:25:40 +00:00
..
Array [JSPerfTests] New tests for Array.prototype.filter and map. 2017-03-24 17:39:34 +00:00
AsyncAwait [js-perf-test] Add a basic async-await microbenchmark 2016-12-20 13:10:07 +00:00
Classes Fix lazy parsing for functions that use super. 2015-02-13 18:35:09 +00:00
Closures [test] Add performance test for closures. 2016-12-05 13:10:44 +00:00
Collections Use merged JSTest config for performance tests. 2014-12-05 08:43:19 +00:00
Exceptions Fixes for try-catch microbenchmark 2015-06-08 10:11:34 +00:00
ForLoops [js-perf-test] add microbenchmarks for C-style for loops 2017-04-12 21:56:43 +00:00
Generators Add js-perf-test benchmark for generators. 2016-05-30 11:36:26 +00:00
Iterators Use merged JSTest config for performance tests. 2014-12-05 08:43:19 +00:00
Keys reland [js-perf-test] Adding micro benchmarks for for-in and keys patterns. 2016-03-02 12:25:41 +00:00
Object [test] Add micro benchmark for Object.create 2016-09-28 08:14:21 +00:00
PropertyQueries [js-perf-test] Fix JSTests/PropertyQueries microbenchmark. 2016-05-17 11:28:31 +00:00
RegExp [js-perf-test] Move SubRegExp class definition outside loop 2016-11-30 12:20:17 +00:00
RestParameters [js-perf-test] Add microbenchmarks for materialized rest parameters. 2017-04-19 05:25:40 +00:00
Scope For Micro-benchmarks for 'with' 2015-06-01 07:40:11 +00:00
SixSpeed [benchmarks] Add ES6 Map/Set benchmarks from SixSpeed 2017-04-18 17:05:58 +00:00
SpreadCalls [es6] implement spread calls 2015-04-09 19:37:19 +00:00
StringIterators [js-perf-test] add microbenchmarks for String Iterators 2016-09-23 19:03:53 +00:00
Strings Use merged JSTest config for performance tests. 2014-12-05 08:43:19 +00:00
Templates Perf tests for Template Literals 2014-12-12 05:14:28 +00:00
TypedArrays [test] Add a benchmark for constructing all types of TypedArrays. 2017-04-11 13:46:10 +00:00
base.js Adjust benchmark framework to avoid spending 50% of time on 'new Date' 2015-05-19 11:19:36 +00:00
JSTests.json [js-perf-test] Add microbenchmarks for materialized rest parameters. 2017-04-19 05:25:40 +00:00
RegExp.json [js-perf-test] Fix JSON syntax for RegExp tests 2016-11-28 13:12:50 +00:00
SixSpeed.json [benchmarks] Add ES6 Map/Set benchmarks from SixSpeed 2017-04-18 17:05:58 +00:00