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

Side by Side Diff: test/perf-test/Object/assign.js

Issue 548833002: [es6] implement Object.assign (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
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 SetBenchmark = new BenchmarkSuite('ObjectAssign', [1000], [
7 new Benchmark('ObjectAssignSimple2', false, false, 0, ObjectAssignSimple2Test, ObjectAssignSimple2Setup, ObjectAssignSimple2TearDown),
8 ]);
9
10
11 var target;
12 var source1;
13 var source2;
14
15 function ObjectAssignSimple2Setup() {
16 // Based on http://jsperf.com/extend-vs-defaults/
17 target = {};
18 source1 = {
19 one: true,
20 two: true,
21 three: true,
22 four: true
23 };
24 source2 = {
25 one: false,
26 two: false,
27 five: true
28 };
29 }
30
31
32 function ObjectAssignSimple2TearDown() {
33 source1 = source2 = target = null;
34 }
35
36
37 function ObjectAssignSimple2Test() {
38 Object.assign(target, source2, source1);
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698