Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/js-perf-test/RestParameters/rest.js

Issue 1331803003: [es6] fixup for rest parameters perf test (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/js-perf-test/JSTests.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 new BenchmarkSuite('Basic', [1000], [ 5 new BenchmarkSuite('Basic1', [1000], [
6 new Benchmark('BasicRest1', false, false, 0, 6 new Benchmark('BasicRest1', false, false, 0,
7 BasicRest1, BasicRest1Setup, BasicRest1TearDown) 7 BasicRest1, BasicRest1Setup, BasicRest1TearDown)
8 ]); 8 ]);
9 9
10 // ---------------------------------------------------------------------------- 10 // ----------------------------------------------------------------------------
11 11
12 var result; 12 var result;
13 13
14 function basic_rest_fn_1(factor, ...values) { 14 function basic_rest_fn_1(factor, ...values) {
15 var result = 0; 15 var result = 0;
16 for (var i = 0; i < values.length; ++i) { 16 for (var i = 0; i < values.length; ++i) {
17 result += (factor * values[i]); 17 result += (factor * values[i]);
18 } 18 }
19 return result; 19 return result;
20 } 20 }
21 21
22 function BasicRest1Setup() {} 22 function BasicRest1Setup() {}
23 23
24 function BasicRest1() { 24 function BasicRest1() {
25 result = basic_rest_fn_1(10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); 25 result = basic_rest_fn_1(10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
26 } 26 }
27 27
28 function BasicRest1TearDown() { 28 function BasicRest1TearDown() {
29 return result == 550; 29 return result == 550;
30 } 30 }
OLDNEW
« no previous file with comments | « test/js-perf-test/JSTests.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698