rm array proto funcs

This commit is contained in:
2026-01-21 00:52:18 -06:00
parent ef49606098
commit 26fce3a5a8
31 changed files with 259 additions and 372 deletions

View File

@@ -9,7 +9,7 @@ var newarr = []
var accstr = ""
for (var i = 0; i < 10000; i++) {
accstr += i;
newarr.push(i.toString())
newarrpush(i.toString())
}
// Arrays to store timing results
var jsonDecodeTimes = [];
@@ -23,22 +23,22 @@ for (var i = 0; i < 100; i++) {
// JSON Decode test
var start = os.now();
var jll = json.decode(ll);
jsonDecodeTimes.push((os.now() - start) * 1000);
jsonDecodeTimespush((os.now() - start) * 1000);
// JSON Encode test
start = os.now();
var jsonStr = JSON.stringify(jll);
jsonEncodeTimes.push((os.now() - start) * 1000);
jsonEncodeTimespush((os.now() - start) * 1000);
// NOTA Encode test
start = os.now();
var nll = nota.encode(jll);
notaEncodeTimes.push((os.now() - start) * 1000);
notaEncodeTimespush((os.now() - start) * 1000);
// NOTA Decode test
start = os.now();
var oll = nota.decode(nll);
notaDecodeTimes.push((os.now() - start) * 1000);
notaDecodeTimespush((os.now() - start) * 1000);
}
// Calculate statistics