Revert of [test] Add performance test for closures. (patchset #1 id:1 of https://codereview.chromium.org/2525053002/ )
Reason for revert: Fails on perf. Original issue's description: > [test] Add performance test for closures. > > Short living closures are very common in Node.js. This benchmark tracks progress > as we move the optimizations that are currently only behind > --mark_shared_functions_for_tier_up to the default settings. > > BUG=v8:5512 > > Committed: https://crrev.com/f277da2a00cfd27d44a33a70213a65bd82d0bc95 > Cr-Commit-Position: refs/heads/master@{#41246} TBR=bmeurer@chromium.org,leszeks@chromium.org,franzih@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5512 Review-Url: https://codereview.chromium.org/2526163003 Cr-Commit-Position: refs/heads/master@{#41261}
This commit is contained in:
parent
cd0c259260
commit
b6ab7996de
@ -1,43 +0,0 @@
|
||||
// Copyright 2015 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
new BenchmarkSuite('Closures', [1000], [
|
||||
new Benchmark('ShortLivingClosures', false, false, 0,
|
||||
ShortLivingClosures, ShortLivingClosuresSetup, ShortLivingClosuresTearDown)
|
||||
]);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// The pattern is this example is very common in Node.js.
|
||||
var fs = {
|
||||
readFile: function(filename, cb) {
|
||||
cb(null, {length: 12});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function printLength (filename) {
|
||||
fs.readFile(filename, foo);
|
||||
|
||||
function foo (err, buf) {
|
||||
if (err) return;
|
||||
for (var j = 0; j<1000; j++) {
|
||||
// Do some work to make the optimization actually worth while
|
||||
buf.length++;
|
||||
}
|
||||
return (buf.length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ShortLivingClosuresSetup() {}
|
||||
|
||||
function ShortLivingClosures() {
|
||||
result = printLength('foo_bar.js');
|
||||
}
|
||||
|
||||
function ShortLivingClosuresTearDown() {
|
||||
return result == 1012;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
// Copyright 2015 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
||||
load('../base.js');
|
||||
load('closures.js');
|
||||
|
||||
var success = true;
|
||||
|
||||
function PrintResult(name, result) {
|
||||
print(name + '-Closures(Score): ' + result);
|
||||
}
|
||||
|
||||
|
||||
function PrintError(name, error) {
|
||||
PrintResult(name, error);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
BenchmarkSuite.config.doWarmup = undefined;
|
||||
BenchmarkSuite.config.doDeterministic = undefined;
|
||||
|
||||
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
||||
NotifyError: PrintError });
|
@ -75,28 +75,6 @@
|
||||
{"name": "DefaultConstructor"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Closures",
|
||||
"path": ["Closures"],
|
||||
"main": "run.js",
|
||||
"resources": ["closures.js"],
|
||||
"flags": [],
|
||||
"results_regexp": "^Closures\\-Closures\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{"name": "Closures"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Closures",
|
||||
"path": ["Closures"],
|
||||
"main": "run.js",
|
||||
"resources": ["closures.js"],
|
||||
"flags": ["--mark_shared_functions_for_tier_up"],
|
||||
"results_regexp": "^Closures\\-Closures\\(Score\\): (.+)$",
|
||||
"tests": [
|
||||
{"name": "Closures"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Collections",
|
||||
"path": ["Collections"],
|
||||
|
Loading…
Reference in New Issue
Block a user