Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,42 @@
// Copyright 2017 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('Let-Standard', [1000], [
new Benchmark('Let-Standard', false, false, 0, LetLoop),
]);
new BenchmarkSuite('Var-Standard', [1000], [
new Benchmark('Var-Standard', false, false, 0, VarLoop),
]);
var x = [-1, 1, 4];
var y = [-11, -1, 1, 2, 3, 4, 5, 6, 20, 44, 87, 99, 100];
function LetLoop() {
"use strict";
const ret = [];
for (let i = 0; i < x.length; i++) {
for (let z = 0; z < y.length; z++) {
if (x[i] == y[z]) {
ret.push(x[i]);
break;
}
}
}
return ret;
}
function VarLoop() {
"use strict";
const ret = [];
for (var i = 0; i < x.length; i++) {
for (var z = 0; z < y.length; z++) {
if (x[i] == y[z]) {
ret.push(x[i]);
break;
}
}
}
return ret;
}

View File

@ -0,0 +1,25 @@
// Copyright 2017 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.
d8.file.execute('../base.js');
d8.file.execute('for_loop.js');
var success = true;
function PrintResult(name, result) {
print(name + '-ForLoop(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 });