remove global

This commit is contained in:
2025-12-18 18:43:23 -06:00
parent aa18a8c8d2
commit d50f4119ee
60 changed files with 378 additions and 282 deletions

View File

@@ -40,4 +40,4 @@ function bottomUpTree(depth) {
mainThread()
$_.stop()
$stop()

View File

@@ -22,4 +22,4 @@ for (var i = 0; i < sieve.length; i++)
log.console(c)
$_.stop()
$stop()

View File

@@ -55,4 +55,4 @@ var n = arg[0] || 10
log.console(`Pfannkuchen(${n}) = ${fannkuch(n)}`)
$_.stop()
$stop()

View File

@@ -13,4 +13,4 @@ for (var i in arr) {
log.console(`elapsed: ${time.number()-now}`)
$_.stop()
$stop()

View File

@@ -393,4 +393,4 @@ log.console("");
log.console("---------------------------------------------------------");
log.console("Benchmark complete.\n");
$_.stop()
$stop()

View File

@@ -37,4 +37,4 @@ for (let y = 0; y < h; ++y) {
log.console(text(row, 'b'));
}
$_.stop()
$stop()

View File

@@ -2,11 +2,11 @@ var math = use('math/radians')
var N = 1000000;
var num = 0;
for (var i = 0; i < N; i ++) {
var x = 2 * $_.random();
var y = $_.random();
var x = 2 * $random();
var y = $random();
if (y < math.sine(x * x))
num++;
}
log.console(2 * num / N);
$_.stop()
$stop()

View File

@@ -185,4 +185,4 @@ log.console(` stack_size: ${fn_info.stack_size}`)
log.console(js.disassemble(advance))
log.console(js.disassemble(advance).length)
$_.stop()
$stop()

View File

@@ -49,4 +49,4 @@ function spectralnorm(n) {
log.console(spectralnorm(arg[0]).toFixed(9));
$_.stop()
$stop()

View File

@@ -15,7 +15,7 @@
// Parse command line arguments
if (arg.length != 2) {
log.console('Usage: cell benchmark_wota_nota_json.ce <LibraryName> <ScenarioName>');
$_.stop()
$stop()
}
var lib_name = arg[0];
@@ -172,13 +172,13 @@ var bench = benchmarks.find(b => b.name == scenario_name);
if (!lib) {
log.console('Unknown library:', lib_name);
log.console('Available libraries:', libraries.map(l => l.name).join(', '));
$_.stop()
$stop()
}
if (!bench) {
log.console('Unknown scenario:', scenario_name);
log.console('Available scenarios:', benchmarks.map(b => b.name).join(', '));
$_.stop()
$stop()
}
// Run the benchmark for this library/scenario combination
@@ -201,4 +201,4 @@ var result = {
log.console(result);
$_.stop()
$stop()