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

Side by Side Diff: test/js-perf-test/Collections/common.js

Issue 685753004: Add performance tests for Map/Set with String and Object keys (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address dslomov comment Created 6 years, 1 month 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/Collections/Collections.json ('k') | test/js-perf-test/Collections/map.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5
6 var N = 10;
7 var keys;
8
9
10 function SetupSmiKeys() {
11 keys = new Array(N * 2);
12 for (var i = 0; i < N * 2; i++) {
13 keys[i] = i;
14 }
15 }
16
17
18 function SetupStringKeys() {
19 keys = new Array(N * 2);
20 for (var i = 0; i < N * 2; i++) {
21 keys[i] = 's' + i;
22 }
23 }
24
25
26 function SetupObjectKeys() {
27 keys = new Array(N * 2);
28 for (var i = 0; i < N * 2; i++) {
29 keys[i] = {};
30 }
31 }
OLDNEW
« no previous file with comments | « test/js-perf-test/Collections/Collections.json ('k') | test/js-perf-test/Collections/map.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698