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

Side by Side Diff: test/js-perf-test/Iterators/forof.js

Issue 662723006: Share test framework between js-perf-tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « test/js-perf-test/Iterators/base.js ('k') | test/js-perf-test/Iterators/run.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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('ForOf', [1000], [ 5 new BenchmarkSuite('ForOf', [1000], [
6 new Benchmark('ArrayValues', false, false, 0, ForOf, ForOfArraySetup, ForOfTea rDown), 6 new Benchmark('ArrayValues', false, false, 0,
7 new Benchmark('ArrayKeys', false, false, 0, ForOf, ForOfArrayKeysSetup, ForOfT earDown), 7 ForOf, ForOfArraySetup, ForOfTearDown),
8 new Benchmark('ArrayEntries', false, false, 0, ForOf, ForOfArrayEntriesSetup, ForOfTearDown), 8 new Benchmark('ArrayKeys', false, false, 0,
9 new Benchmark('Uint8Array', false, false, 0, ForOf, ForOfUint8ArraySetup, ForO fTearDown), 9 ForOf, ForOfArrayKeysSetup, ForOfTearDown),
10 new Benchmark('Float64Array', false, false, 0, ForOf, ForOfFloat64ArraySetup, ForOfTearDown), 10 new Benchmark('ArrayEntries', false, false, 0,
11 new Benchmark('String', false, false, 0, ForOf, ForOfStringSetup, ForOfTearDow n), 11 ForOf, ForOfArrayEntriesSetup, ForOfTearDown),
12 new Benchmark('Uint8Array', false, false, 0,
13 ForOf, ForOfUint8ArraySetup, ForOfTearDown),
14 new Benchmark('Float64Array', false, false, 0,
15 ForOf, ForOfFloat64ArraySetup, ForOfTearDown),
16 new Benchmark('String', false, false, 0,
17 ForOf, ForOfStringSetup, ForOfTearDown),
12 ]); 18 ]);
13 19
14 20
15 var iterable; 21 var iterable;
16 var N = 100; 22 var N = 100;
17 var expected, result; 23 var expected, result;
18 24
19 25
20 function ForOfArraySetupHelper(constructor) { 26 function ForOfArraySetupHelper(constructor) {
21 iterable = new constructor(N); 27 iterable = new constructor(N);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 throw new Error("Bad result: " + result); 85 throw new Error("Bad result: " + result);
80 } 86 }
81 } 87 }
82 88
83 89
84 function ForOf() { 90 function ForOf() {
85 for (var x of iterable) { 91 for (var x of iterable) {
86 result = x; 92 result = x;
87 } 93 }
88 } 94 }
OLDNEW
« no previous file with comments | « test/js-perf-test/Iterators/base.js ('k') | test/js-perf-test/Iterators/run.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698