From 396491ffd6f4428f72e749057da78bf042bf36b7 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 15 Apr 2021 13:51:19 -0300 Subject: run 5s of tests instead of 1 (cur: 87k/sec) Why does this improve efficiency? I do not know. It's entirely possi8le the earlier estim8tions were just off, and this is more accur8te. --- upd8.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upd8.js b/upd8.js index 4555b00..7396ac3 100755 --- a/upd8.js +++ b/upd8.js @@ -1175,13 +1175,14 @@ const replacerSpec = { { function test(input) { let n = 0; + const s = 5; const start = Date.now(); - const end = start + 1000; + const end = start + s * 1000; while (Date.now() < end) { transformInline.parse(input); n++; } - console.log(`Ran ${n} times.`); + console.log(`Ran ${Math.round(n / s)} times/sec.`); } test(fixWS` -- cgit 1.3.0-6-gf8a5