fix all core script syntax issues

This commit is contained in:
2026-02-17 11:23:12 -06:00
parent 2d054fcf21
commit 12b6c3544e
30 changed files with 910 additions and 897 deletions

View File

@@ -1,14 +1,16 @@
function mainThread() {
var maxDepth = max(6, Number(arg[0] || 16));
var stretchDepth = maxDepth + 1;
var check = itemCheck(bottomUpTree(stretchDepth));
var longLivedTree = null
var depth = null
var iterations = null
log.console(`stretch tree of depth ${stretchDepth}\t check: ${check}`);
var longLivedTree = bottomUpTree(maxDepth);
longLivedTree = bottomUpTree(maxDepth);
for (var depth = 4; depth <= maxDepth; depth += 2) {
var iterations = 1 << maxDepth - depth + 4;
for (depth = 4; depth <= maxDepth; depth += 2) {
iterations = 1 << maxDepth - depth + 4;
work(iterations, depth);
}
@@ -17,7 +19,8 @@ function mainThread() {
function work(iterations, depth) {
var check = 0;
for (var i = 0; i < iterations; i++)
var i = 0
for (i = 0; i < iterations; i++)
check += itemCheck(bottomUpTree(depth));
log.console(`${iterations}\t trees of depth ${depth}\t check: ${check}`);
}