From 93795430f4f39a0d48a2eccb3778eaebbbb251a2 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 15 Oct 2024 00:34:33 -0300 Subject: [PATCH 1/6] examples: publish .log for comparisson between impl --- examples/.gitignore | 1 - examples/create-uint32array/node.js.log | 9 +++++++ examples/crypto-verify/node.js.log | 15 ++++++++++++ examples/deleting-properties/node.js.log | 24 +++++++++++++++++++ examples/empty/node.js.log | 9 +++++++ examples/fs-read-async/node.js.log | 15 ++++++++++++ examples/fs-read-async/node.managed.js.log | 9 +++++++ examples/fs-read-sync/node.js.log | 15 ++++++++++++ examples/plugins/all.js.log | 9 +++++++ examples/plugins/v8-get-opt-status.js.log | 9 +++++++ examples/plugins/v8-never-optimize.js.log | 9 +++++++ examples/plugins/v8-optimize-next-call.js.log | 9 +++++++ examples/string-replace/node.js.log | 15 ++++++++++++ examples/string-searching/node.js.log | 21 ++++++++++++++++ 14 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 examples/create-uint32array/node.js.log create mode 100644 examples/crypto-verify/node.js.log create mode 100644 examples/deleting-properties/node.js.log create mode 100644 examples/empty/node.js.log create mode 100644 examples/fs-read-async/node.js.log create mode 100644 examples/fs-read-async/node.managed.js.log create mode 100644 examples/fs-read-sync/node.js.log create mode 100644 examples/plugins/all.js.log create mode 100644 examples/plugins/v8-get-opt-status.js.log create mode 100644 examples/plugins/v8-never-optimize.js.log create mode 100644 examples/plugins/v8-optimize-next-call.js.log create mode 100644 examples/string-replace/node.js.log create mode 100644 examples/string-searching/node.js.log diff --git a/examples/.gitignore b/examples/.gitignore index a988499..e69de29 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1 +0,0 @@ -**/*.log diff --git a/examples/create-uint32array/node.js.log b/examples/create-uint32array/node.js.log new file mode 100644 index 0000000..a2b3442 --- /dev/null +++ b/examples/create-uint32array/node.js.log @@ -0,0 +1,9 @@ +new Uint32Array(1024) x 2,945,994 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.77ns ... 352.90ns) p75=341.52ns p99=352.90ns +[Managed] new Uint32Array(1024) x 2,944,425 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(335.88ns ... 341.00ns) p75=338.80ns p99=341.00ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,928,218 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(325.14ns ... 351.93ns) p75=343.81ns p99=351.93ns +[Managed] new Uint32Array(1024) x 3,039,723 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(326.89ns ... 330.82ns) p75=328.74ns p99=330.82ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,904,223 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(326.03ns ... 360.28ns) p75=356.52ns p99=360.28ns +[Managed] new Uint32Array(1024) x 2,995,623 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(331.31ns ... 334.45ns) p75=333.61ns p99=334.45ns +---------------------------------------------------------------------------- diff --git a/examples/crypto-verify/node.js.log b/examples/crypto-verify/node.js.log new file mode 100644 index 0000000..4a1ad52 --- /dev/null +++ b/examples/crypto-verify/node.js.log @@ -0,0 +1,15 @@ +crypto.createVerify('RSA-SHA256') x 10,884 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(89.03us ... 95.09us) p75=92.70us p99=95.09us +crypto.verify('RSA-SHA256') x 10,879 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(91.15us ... 93.11us) p75=92.38us p99=93.11us +[Managed] crypto.createVerify('RSA-SHA256') x 10,958 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(88.31us ... 94.01us) p75=93.06us p99=94.01us +[Managed] crypto.verify('RSA-SHA256') x 10,881 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.81us ... 93.01us) p75=92.35us p99=93.01us +---------------------------------------------------------------------------- +crypto.createVerify('RSA-SHA256') x 10,900 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.63us ... 94.21us) p75=92.22us p99=94.21us +crypto.verify('RSA-SHA256') x 10,911 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.53us ... 92.75us) p75=92.21us p99=92.75us +[Managed] crypto.createVerify('RSA-SHA256') x 10,922 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.33us ... 93.51us) p75=92.43us p99=93.51us +[Managed] crypto.verify('RSA-SHA256') x 10,925 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.91us ... 92.27us) p75=92.04us p99=92.27us +---------------------------------------------------------------------------- +crypto.createVerify('RSA-SHA256') x 10,921 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(89.78us ... 93.13us) p75=92.37us p99=93.13us +crypto.verify('RSA-SHA256') x 10,917 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.95us ... 93.00us) p75=92.22us p99=93.00us +[Managed] crypto.createVerify('RSA-SHA256') x 10,961 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(87.86us ... 92.78us) p75=91.93us p99=92.78us +[Managed] crypto.verify('RSA-SHA256') x 10,915 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.44us ... 93.09us) p75=92.19us p99=93.09us +---------------------------------------------------------------------------- diff --git a/examples/deleting-properties/node.js.log b/examples/deleting-properties/node.js.log new file mode 100644 index 0000000..7bb5dd3 --- /dev/null +++ b/examples/deleting-properties/node.js.log @@ -0,0 +1,24 @@ +Using delete property x 8,021,743 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(123.17ns ... 124.91ns) p75=124.18ns p99=124.91ns +Using delete property (proto: null) x 23,756,517 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(41.65ns ... 42.81ns) p75=42.55ns p99=42.81ns +Using delete property (cached proto: null) x 7,249,105 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(135.86ns ... 138.04ns) p75=137.53ns p99=138.04ns +Using undefined assignment x 133,028,214 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.49ns ... 7.52ns) p75=7.52ns p99=7.52ns +Using undefined assignment (proto: null) x 26,015,168 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(37.00ns ... 39.25ns) p75=38.61ns p99=39.25ns +Using undefined property (cached proto: null) x 59,030,895 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.76ns ... 17.24ns) p75=17.01ns p99=17.24ns +[Managed] Using undefined property (cached proto: null) x 36,770,998 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(27.99ns ... 28.40ns) p75=28.24ns p99=28.40ns +---------------------------------------------------------------------------- +Using delete property x 8,035,679 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(122.99ns ... 126.36ns) p75=124.75ns p99=126.36ns +Using delete property (proto: null) x 23,175,148 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.21ns ... 43.87ns) p75=43.47ns p99=43.87ns +Using delete property (cached proto: null) x 7,290,654 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(135.62ns ... 140.81ns) p75=137.84ns p99=140.81ns +Using undefined assignment x 133,313,959 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.48ns ... 7.53ns) p75=7.51ns p99=7.53ns +Using undefined assignment (proto: null) x 25,725,194 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.35ns ... 39.21ns) p75=39.06ns p99=39.21ns +Using undefined property (cached proto: null) x 58,721,321 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.94ns ... 17.21ns) p75=17.06ns p99=17.21ns +[Managed] Using undefined property (cached proto: null) x 36,605,350 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(27.99ns ... 35.67ns) p75=28.35ns p99=35.67ns +---------------------------------------------------------------------------- +Using delete property x 7,903,636 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(125.49ns ... 130.35ns) p75=126.04ns p99=130.35ns +Using delete property (proto: null) x 22,791,564 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(43.05ns ... 44.58ns) p75=43.92ns p99=44.58ns +Using delete property (cached proto: null) x 7,225,552 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(137.35ns ... 141.31ns) p75=138.42ns p99=141.31ns +Using undefined assignment x 133,185,707 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(7.46ns ... 7.59ns) p75=7.53ns p99=7.59ns +Using undefined assignment (proto: null) x 24,994,818 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(39.12ns ... 40.74ns) p75=40.49ns p99=40.74ns +Using undefined property (cached proto: null) x 57,436,715 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(16.19ns ... 17.90ns) p75=17.63ns p99=17.90ns +[Managed] Using undefined property (cached proto: null) x 36,934,650 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(28.04ns ... 35.62ns) p75=28.50ns p99=35.62ns +---------------------------------------------------------------------------- diff --git a/examples/empty/node.js.log b/examples/empty/node.js.log new file mode 100644 index 0000000..970304a --- /dev/null +++ b/examples/empty/node.js.log @@ -0,0 +1,9 @@ +empty x 216,608,773 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.50ns ... 4.76ns) p75=4.58ns p99=4.76ns +empty async x 20,638,936 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(47.89ns ... 50.02ns) p75=48.76ns p99=50.02ns +---------------------------------------------------------------------------- +empty x 217,108,698 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.78ns) p75=4.57ns p99=4.78ns +empty async x 20,876,529 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(47.54ns ... 47.87ns) p75=47.78ns p99=47.87ns +---------------------------------------------------------------------------- +empty x 217,409,506 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.76ns) p75=4.58ns p99=4.76ns +empty async x 20,675,677 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(47.62ns ... 48.86ns) p75=48.29ns p99=48.86ns +---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.js.log b/examples/fs-read-async/node.js.log new file mode 100644 index 0000000..088ea03 --- /dev/null +++ b/examples/fs-read-async/node.js.log @@ -0,0 +1,15 @@ +readFile x 23,132 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(39.48us ... 46.20us) p75=43.49us p99=46.20us +readFile utf-8 x 22,896 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(41.83us ... 45.49us) p75=43.71us p99=45.49us +[managed] readFile x 23,251 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.53us ... 43.04us) p75=42.93us p99=43.04us +[managed] readFile utf-8 x 23,293 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.63us ... 43.13us) p75=43.09us p99=43.13us +---------------------------------------------------------------------------- +readFile x 22,788 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.63us ... 47.69us) p75=45.63us p99=47.69us +readFile utf-8 x 23,106 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.52us ... 44.58us) p75=44.06us p99=44.58us +[managed] readFile x 23,477 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.33us ... 43.15us) p75=42.75us p99=43.15us +[managed] readFile utf-8 x 23,545 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.29us ... 42.61us) p75=42.51us p99=42.61us +---------------------------------------------------------------------------- +readFile x 22,845 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.43us ... 48.12us) p75=45.39us p99=48.12us +readFile utf-8 x 23,071 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.55us ... 44.61us) p75=44.19us p99=44.61us +[managed] readFile x 23,498 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.18us ... 43.34us) p75=42.81us p99=43.34us +[managed] readFile utf-8 x 23,500 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.37us ... 42.78us) p75=42.72us p99=42.78us +---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.managed.js.log b/examples/fs-read-async/node.managed.js.log new file mode 100644 index 0000000..12e6b31 --- /dev/null +++ b/examples/fs-read-async/node.managed.js.log @@ -0,0 +1,9 @@ +readFile x 22,852 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(39.46us ... 48.33us) p75=45.33us p99=48.33us +readFile utf-8 x 23,001 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.28us ... 44.69us) p75=44.01us p99=44.69us +---------------------------------------------------------------------------- +readFile x 22,857 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.49us ... 48.30us) p75=44.94us p99=48.30us +readFile utf-8 x 23,167 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.20us ... 44.31us) p75=44.03us p99=44.31us +---------------------------------------------------------------------------- +readFile x 22,816 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.57us ... 48.07us) p75=45.27us p99=48.07us +readFile utf-8 x 23,273 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.18us ... 44.09us) p75=43.35us p99=44.09us +---------------------------------------------------------------------------- diff --git a/examples/fs-read-sync/node.js.log b/examples/fs-read-sync/node.js.log new file mode 100644 index 0000000..a89e239 --- /dev/null +++ b/examples/fs-read-sync/node.js.log @@ -0,0 +1,15 @@ +readFileSync x 195,080 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.04us ... 5.60us) p75=5.09us p99=5.60us +readFileSync utf-8 x 205,245 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.85us ... 4.90us) p75=4.86us p99=4.90us +[Managed] readFileSync x 194,864 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.08us ... 5.28us) p75=5.16us p99=5.28us +[Managed] readFileSync utf-8 x 201,899 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.92us ... 5.00us) p75=4.97us p99=5.00us +---------------------------------------------------------------------------- +readFileSync x 194,228 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.07us ... 5.29us) p75=5.09us p99=5.29us +readFileSync utf-8 x 205,275 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.84us ... 4.90us) p75=4.88us p99=4.90us +[Managed] readFileSync x 195,645 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.07us ... 5.18us) p75=5.10us p99=5.18us +[Managed] readFileSync utf-8 x 202,022 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.89us ... 5.02us) p75=4.99us p99=5.02us +---------------------------------------------------------------------------- +readFileSync x 194,740 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.16us) p75=5.10us p99=5.16us +readFileSync utf-8 x 205,046 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.84us ... 4.92us) p75=4.88us p99=4.92us +[Managed] readFileSync x 196,632 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.12us) p75=5.08us p99=5.12us +[Managed] readFileSync utf-8 x 203,879 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.87us ... 4.96us) p75=4.94us p99=4.96us +---------------------------------------------------------------------------- diff --git a/examples/plugins/all.js.log b/examples/plugins/all.js.log new file mode 100644 index 0000000..38411c5 --- /dev/null +++ b/examples/plugins/all.js.log @@ -0,0 +1,9 @@ +new Uint32Array(1024) x 2,922,582 ops/sec (8 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(330.28ns ... 336.04ns) p75=333.42ns p99=336.04ns +[Managed] new Uint32Array(1024) x 2,965,838 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(325.11ns ... 364.01ns) p75=333.88ns p99=364.01ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,949,878 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(328.98ns ... 356.16ns) p75=342.18ns p99=356.16ns +[Managed] new Uint32Array(1024) x 2,979,929 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(326.47ns ... 359.19ns) p75=343.17ns p99=359.19ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,952,737 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(330.21ns ... 336.03ns) p75=333.92ns p99=336.03ns +[Managed] new Uint32Array(1024) x 2,947,240 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(332.35ns ... 357.84ns) p75=344.87ns p99=357.84ns +---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-get-opt-status.js.log b/examples/plugins/v8-get-opt-status.js.log new file mode 100644 index 0000000..6af85b6 --- /dev/null +++ b/examples/plugins/v8-get-opt-status.js.log @@ -0,0 +1,9 @@ +new Uint32Array(1024) x 3,027,914 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(321.84ns ... 327.42ns) p75=325.05ns p99=327.42ns +[Managed] new Uint32Array(1024) x 3,002,388 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(325.66ns ... 351.89ns) p75=329.63ns p99=351.89ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,962,416 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(327.29ns ... 341.52ns) p75=335.57ns p99=341.52ns +[Managed] new Uint32Array(1024) x 2,933,543 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(333.47ns ... 347.78ns) p75=340.07ns p99=347.78ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,957,336 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(326.98ns ... 350.76ns) p75=336.85ns p99=350.76ns +[Managed] new Uint32Array(1024) x 2,970,617 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.28ns ... 336.22ns) p75=334.68ns p99=336.22ns +---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-never-optimize.js.log b/examples/plugins/v8-never-optimize.js.log new file mode 100644 index 0000000..9586759 --- /dev/null +++ b/examples/plugins/v8-never-optimize.js.log @@ -0,0 +1,9 @@ +new Uint32Array(1024) x 2,898,778 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(329.49ns ... 351.31ns) p75=345.73ns p99=351.31ns +[Managed] new Uint32Array(1024) x 2,986,941 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(327.36ns ... 355.02ns) p75=343.92ns p99=355.02ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,932,389 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(327.69ns ... 352.17ns) p75=341.07ns p99=352.17ns +[Managed] new Uint32Array(1024) x 3,005,432 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(330.33ns ... 333.30ns) p75=332.75ns p99=333.30ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,941,011 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.60ns ... 353.39ns) p75=343.77ns p99=353.39ns +[Managed] new Uint32Array(1024) x 3,020,232 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.83ns ... 331.68ns) p75=331.36ns p99=331.68ns +---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-optimize-next-call.js.log b/examples/plugins/v8-optimize-next-call.js.log new file mode 100644 index 0000000..2d56dee --- /dev/null +++ b/examples/plugins/v8-optimize-next-call.js.log @@ -0,0 +1,9 @@ +new Uint32Array(1024) x 2,952,682 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(326.82ns ... 356.47ns) p75=340.14ns p99=356.47ns +[Managed] new Uint32Array(1024) x 2,948,792 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(330.52ns ... 360.90ns) p75=355.11ns p99=360.90ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,923,303 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(328.18ns ... 354.53ns) p75=338.46ns p99=354.53ns +[Managed] new Uint32Array(1024) x 2,937,429 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(331.77ns ... 345.95ns) p75=340.34ns p99=345.95ns +---------------------------------------------------------------------------- +new Uint32Array(1024) x 2,920,072 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(327.46ns ... 358.16ns) p75=345.19ns p99=358.16ns +[Managed] new Uint32Array(1024) x 2,935,742 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(332.38ns ... 352.88ns) p75=345.28ns p99=352.88ns +---------------------------------------------------------------------------- diff --git a/examples/string-replace/node.js.log b/examples/string-replace/node.js.log new file mode 100644 index 0000000..2b30d17 --- /dev/null +++ b/examples/string-replace/node.js.log @@ -0,0 +1,15 @@ +single with matcher x 739,414 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.34us ... 1.39us) p75=1.34us p99=1.39us +multiple replaces x 629,147 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(1.47us ... 1.66us) p75=1.63us p99=1.66us +[Managed] single with matcher x 759,021 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.33us) p75=1.32us p99=1.33us +[Managed] multiple replaces x 643,853 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.55us) p75=1.55us p99=1.55us +---------------------------------------------------------------------------- +single with matcher x 749,446 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.36us) p75=1.33us p99=1.36us +multiple replaces x 622,863 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.76us) p75=1.65us p99=1.76us +[Managed] single with matcher x 774,824 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.29us) p75=1.29us p99=1.29us +[Managed] multiple replaces x 643,085 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.56us) p75=1.55us p99=1.56us +---------------------------------------------------------------------------- +single with matcher x 751,805 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.33us) p75=1.33us p99=1.33us +multiple replaces x 610,876 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.47us ... 1.71us) p75=1.63us p99=1.71us +[Managed] single with matcher x 773,721 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.30us) p75=1.29us p99=1.30us +[Managed] multiple replaces x 643,996 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.57us) p75=1.55us p99=1.57us +---------------------------------------------------------------------------- diff --git a/examples/string-searching/node.js.log b/examples/string-searching/node.js.log new file mode 100644 index 0000000..32ba47a --- /dev/null +++ b/examples/string-searching/node.js.log @@ -0,0 +1,21 @@ +Using includes x 216,514,984 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.52ns ... 5.03ns) p75=4.62ns p99=5.03ns +Using indexof x 131,207,112 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.57ns ... 7.68ns) p75=7.61ns p99=7.68ns +Using cached RegExp.test x 19,879,400 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.18ns ... 50.35ns) p75=50.30ns p99=50.35ns +[Managed] Using includes x 2,308,493,562 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,321,058,069 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,712,159 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(40.25ns ... 40.69ns) p75=40.45ns p99=40.69ns +---------------------------------------------------------------------------- +Using includes x 216,748,330 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.53ns ... 4.81ns) p75=4.62ns p99=4.81ns +Using indexof x 130,686,026 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.82ns) p75=7.64ns p99=7.82ns +Using cached RegExp.test x 19,915,831 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.08ns ... 50.30ns) p75=50.25ns p99=50.30ns +[Managed] Using includes x 2,312,395,350 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,321,453,259 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,858,397 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.00ns ... 41.02ns) p75=40.30ns p99=41.02ns +---------------------------------------------------------------------------- +Using includes x 216,731,820 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.53ns ... 4.80ns) p75=4.63ns p99=4.80ns +Using indexof x 131,345,255 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.57ns ... 7.66ns) p75=7.62ns p99=7.66ns +Using cached RegExp.test x 19,861,824 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(50.29ns ... 50.44ns) p75=50.33ns p99=50.44ns +[Managed] Using includes x 2,293,197,582 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,319,938,438 ops/sec (16 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,785,474 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(39.99ns ... 40.96ns) p75=40.26ns p99=40.96ns +---------------------------------------------------------------------------- From ecf3b944ecbc4111796eadff64d84c4a5284148e Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 15 Oct 2024 00:51:02 -0300 Subject: [PATCH 2/6] examples: update will full warmup run --- examples/create-uint32array/node.js.log | 12 +++--- examples/crypto-verify/node.js.log | 24 +++++------ examples/deleting-properties/node.js.log | 42 +++++++++---------- examples/empty/node.js.log | 12 +++--- examples/fs-read-async/node.js.log | 24 +++++------ examples/fs-read-async/node.managed.js.log | 12 +++--- examples/fs-read-sync/node.js.log | 24 +++++------ examples/plugins/all.js.log | 12 +++--- examples/plugins/v8-get-opt-status.js.log | 12 +++--- examples/plugins/v8-never-optimize.js.log | 12 +++--- examples/plugins/v8-optimize-next-call.js.log | 12 +++--- examples/string-replace/node.js.log | 24 +++++------ examples/string-searching/node.js.log | 36 ++++++++-------- 13 files changed, 129 insertions(+), 129 deletions(-) diff --git a/examples/create-uint32array/node.js.log b/examples/create-uint32array/node.js.log index a2b3442..a00113e 100644 --- a/examples/create-uint32array/node.js.log +++ b/examples/create-uint32array/node.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,945,994 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.77ns ... 352.90ns) p75=341.52ns p99=352.90ns -[Managed] new Uint32Array(1024) x 2,944,425 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(335.88ns ... 341.00ns) p75=338.80ns p99=341.00ns +new Uint32Array(1024) x 3,043,009 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(324.52ns ... 330.78ns) p75=329.40ns p99=330.78ns +[Managed] new Uint32Array(1024) x 2,973,065 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.56ns ... 354.73ns) p75=342.17ns p99=354.73ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,928,218 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(325.14ns ... 351.93ns) p75=343.81ns p99=351.93ns -[Managed] new Uint32Array(1024) x 3,039,723 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(326.89ns ... 330.82ns) p75=328.74ns p99=330.82ns +new Uint32Array(1024) x 2,945,725 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(326.29ns ... 356.17ns) p75=335.18ns p99=356.17ns +[Managed] new Uint32Array(1024) x 2,855,082 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(334.81ns ... 359.21ns) p75=350.26ns p99=359.21ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,904,223 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(326.03ns ... 360.28ns) p75=356.52ns p99=360.28ns -[Managed] new Uint32Array(1024) x 2,995,623 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(331.31ns ... 334.45ns) p75=333.61ns p99=334.45ns +new Uint32Array(1024) x 2,994,155 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(327.63ns ... 339.22ns) p75=336.48ns p99=339.22ns +[Managed] new Uint32Array(1024) x 2,936,781 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(333.72ns ... 348.28ns) p75=340.69ns p99=348.28ns ---------------------------------------------------------------------------- diff --git a/examples/crypto-verify/node.js.log b/examples/crypto-verify/node.js.log index 4a1ad52..bbc11b7 100644 --- a/examples/crypto-verify/node.js.log +++ b/examples/crypto-verify/node.js.log @@ -1,15 +1,15 @@ -crypto.createVerify('RSA-SHA256') x 10,884 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(89.03us ... 95.09us) p75=92.70us p99=95.09us -crypto.verify('RSA-SHA256') x 10,879 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(91.15us ... 93.11us) p75=92.38us p99=93.11us -[Managed] crypto.createVerify('RSA-SHA256') x 10,958 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(88.31us ... 94.01us) p75=93.06us p99=94.01us -[Managed] crypto.verify('RSA-SHA256') x 10,881 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.81us ... 93.01us) p75=92.35us p99=93.01us +crypto.createVerify('RSA-SHA256') x 11,027 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(87.67us ... 91.64us) p75=91.13us p99=91.64us +crypto.verify('RSA-SHA256') x 10,779 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(88.53us ... 95.15us) p75=93.88us p99=95.15us +[Managed] crypto.createVerify('RSA-SHA256') x 10,701 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(92.04us ... 94.72us) p75=94.27us p99=94.72us +[Managed] crypto.verify('RSA-SHA256') x 10,716 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(91.74us ... 94.90us) p75=93.47us p99=94.90us ---------------------------------------------------------------------------- -crypto.createVerify('RSA-SHA256') x 10,900 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.63us ... 94.21us) p75=92.22us p99=94.21us -crypto.verify('RSA-SHA256') x 10,911 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.53us ... 92.75us) p75=92.21us p99=92.75us -[Managed] crypto.createVerify('RSA-SHA256') x 10,922 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.33us ... 93.51us) p75=92.43us p99=93.51us -[Managed] crypto.verify('RSA-SHA256') x 10,925 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.91us ... 92.27us) p75=92.04us p99=92.27us +crypto.createVerify('RSA-SHA256') x 10,975 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(89.66us ... 92.46us) p75=91.28us p99=92.46us +crypto.verify('RSA-SHA256') x 10,724 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(91.51us ... 95.02us) p75=94.05us p99=95.02us +[Managed] crypto.createVerify('RSA-SHA256') x 10,905 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(90.14us ... 93.21us) p75=91.97us p99=93.21us +[Managed] crypto.verify('RSA-SHA256') x 10,655 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(93.30us ... 94.30us) p75=94.00us p99=94.30us ---------------------------------------------------------------------------- -crypto.createVerify('RSA-SHA256') x 10,921 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(89.78us ... 93.13us) p75=92.37us p99=93.13us -crypto.verify('RSA-SHA256') x 10,917 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.95us ... 93.00us) p75=92.22us p99=93.00us -[Managed] crypto.createVerify('RSA-SHA256') x 10,961 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(87.86us ... 92.78us) p75=91.93us p99=92.78us -[Managed] crypto.verify('RSA-SHA256') x 10,915 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.44us ... 93.09us) p75=92.19us p99=93.09us +crypto.createVerify('RSA-SHA256') x 10,748 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(92.83us ... 94.42us) p75=93.88us p99=94.42us +crypto.verify('RSA-SHA256') x 10,689 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.92us ... 95.82us) p75=94.17us p99=95.82us +[Managed] crypto.createVerify('RSA-SHA256') x 10,852 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.14us ... 94.10us) p75=93.77us p99=94.10us +[Managed] crypto.verify('RSA-SHA256') x 10,867 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(90.40us ... 94.64us) p75=92.81us p99=94.64us ---------------------------------------------------------------------------- diff --git a/examples/deleting-properties/node.js.log b/examples/deleting-properties/node.js.log index 7bb5dd3..7319ba5 100644 --- a/examples/deleting-properties/node.js.log +++ b/examples/deleting-properties/node.js.log @@ -1,24 +1,24 @@ -Using delete property x 8,021,743 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(123.17ns ... 124.91ns) p75=124.18ns p99=124.91ns -Using delete property (proto: null) x 23,756,517 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(41.65ns ... 42.81ns) p75=42.55ns p99=42.81ns -Using delete property (cached proto: null) x 7,249,105 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(135.86ns ... 138.04ns) p75=137.53ns p99=138.04ns -Using undefined assignment x 133,028,214 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.49ns ... 7.52ns) p75=7.52ns p99=7.52ns -Using undefined assignment (proto: null) x 26,015,168 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(37.00ns ... 39.25ns) p75=38.61ns p99=39.25ns -Using undefined property (cached proto: null) x 59,030,895 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.76ns ... 17.24ns) p75=17.01ns p99=17.24ns -[Managed] Using undefined property (cached proto: null) x 36,770,998 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(27.99ns ... 28.40ns) p75=28.24ns p99=28.40ns +Using delete property x 7,832,497 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(127.40ns ... 128.26ns) p75=128.00ns p99=128.26ns +Using delete property (proto: null) x 23,423,727 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.46ns ... 43.18ns) p75=42.99ns p99=43.18ns +Using delete property (cached proto: null) x 7,367,072 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(134.93ns ... 137.35ns) p75=136.11ns p99=137.35ns +Using undefined assignment x 132,292,865 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.53ns ... 7.60ns) p75=7.56ns p99=7.60ns +Using undefined assignment (proto: null) x 25,594,832 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.90ns ... 39.38ns) p75=39.16ns p99=39.38ns +Using undefined property (cached proto: null) x 58,328,070 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(17.04ns ... 17.29ns) p75=17.22ns p99=17.29ns +[Managed] Using undefined property (cached proto: null) x 35,588,926 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(28.01ns ... 28.18ns) p75=28.13ns p99=28.18ns ---------------------------------------------------------------------------- -Using delete property x 8,035,679 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(122.99ns ... 126.36ns) p75=124.75ns p99=126.36ns -Using delete property (proto: null) x 23,175,148 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.21ns ... 43.87ns) p75=43.47ns p99=43.87ns -Using delete property (cached proto: null) x 7,290,654 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(135.62ns ... 140.81ns) p75=137.84ns p99=140.81ns -Using undefined assignment x 133,313,959 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.48ns ... 7.53ns) p75=7.51ns p99=7.53ns -Using undefined assignment (proto: null) x 25,725,194 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.35ns ... 39.21ns) p75=39.06ns p99=39.21ns -Using undefined property (cached proto: null) x 58,721,321 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.94ns ... 17.21ns) p75=17.06ns p99=17.21ns -[Managed] Using undefined property (cached proto: null) x 36,605,350 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(27.99ns ... 35.67ns) p75=28.35ns p99=35.67ns +Using delete property x 7,814,608 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(127.50ns ... 128.30ns) p75=128.25ns p99=128.30ns +Using delete property (proto: null) x 23,431,652 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.51ns ... 42.97ns) p75=42.83ns p99=42.97ns +Using delete property (cached proto: null) x 7,305,690 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(136.22ns ... 137.59ns) p75=137.37ns p99=137.59ns +Using undefined assignment x 129,085,327 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.72ns ... 7.83ns) p75=7.76ns p99=7.83ns +Using undefined assignment (proto: null) x 25,629,477 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.79ns ... 39.27ns) p75=39.08ns p99=39.27ns +Using undefined property (cached proto: null) x 58,340,080 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.93ns ... 17.45ns) p75=17.12ns p99=17.45ns +[Managed] Using undefined property (cached proto: null) x 35,547,235 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(27.90ns ... 28.77ns) p75=28.29ns p99=28.77ns ---------------------------------------------------------------------------- -Using delete property x 7,903,636 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(125.49ns ... 130.35ns) p75=126.04ns p99=130.35ns -Using delete property (proto: null) x 22,791,564 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(43.05ns ... 44.58ns) p75=43.92ns p99=44.58ns -Using delete property (cached proto: null) x 7,225,552 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(137.35ns ... 141.31ns) p75=138.42ns p99=141.31ns -Using undefined assignment x 133,185,707 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(7.46ns ... 7.59ns) p75=7.53ns p99=7.59ns -Using undefined assignment (proto: null) x 24,994,818 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(39.12ns ... 40.74ns) p75=40.49ns p99=40.74ns -Using undefined property (cached proto: null) x 57,436,715 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(16.19ns ... 17.90ns) p75=17.63ns p99=17.90ns -[Managed] Using undefined property (cached proto: null) x 36,934,650 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(28.04ns ... 35.62ns) p75=28.50ns p99=35.62ns +Using delete property x 7,767,423 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(128.28ns ... 129.20ns) p75=129.00ns p99=129.20ns +Using delete property (proto: null) x 23,253,711 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.62ns ... 43.55ns) p75=43.22ns p99=43.55ns +Using delete property (cached proto: null) x 7,260,588 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(136.48ns ... 137.72ns) p75=137.47ns p99=137.72ns +Using undefined assignment x 125,714,722 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.55ns ... 7.61ns) p75=7.59ns p99=7.61ns +Using undefined assignment (proto: null) x 25,970,526 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.33ns ... 38.78ns) p75=38.56ns p99=38.78ns +Using undefined property (cached proto: null) x 54,970,601 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(17.18ns ... 17.27ns) p75=17.23ns p99=17.27ns +[Managed] Using undefined property (cached proto: null) x 35,471,223 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(28.04ns ... 28.47ns) p75=28.31ns p99=28.47ns ---------------------------------------------------------------------------- diff --git a/examples/empty/node.js.log b/examples/empty/node.js.log index 970304a..11a8671 100644 --- a/examples/empty/node.js.log +++ b/examples/empty/node.js.log @@ -1,9 +1,9 @@ -empty x 216,608,773 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.50ns ... 4.76ns) p75=4.58ns p99=4.76ns -empty async x 20,638,936 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(47.89ns ... 50.02ns) p75=48.76ns p99=50.02ns +empty x 219,338,475 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.65ns) p75=4.59ns p99=4.65ns +empty async x 22,667,494 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(43.55ns ... 44.19ns) p75=43.95ns p99=44.19ns ---------------------------------------------------------------------------- -empty x 217,108,698 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.78ns) p75=4.57ns p99=4.78ns -empty async x 20,876,529 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(47.54ns ... 47.87ns) p75=47.78ns p99=47.87ns +empty x 221,169,832 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.53ns) p75=4.52ns p99=4.53ns +empty async x 21,007,759 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(46.85ns ... 50.78ns) p75=47.24ns p99=50.78ns ---------------------------------------------------------------------------- -empty x 217,409,506 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.76ns) p75=4.58ns p99=4.76ns -empty async x 20,675,677 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(47.62ns ... 48.86ns) p75=48.29ns p99=48.86ns +empty x 221,155,223 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.54ns) p75=4.53ns p99=4.54ns +empty async x 22,406,761 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(41.36ns ... 45.44ns) p75=44.86ns p99=45.44ns ---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.js.log b/examples/fs-read-async/node.js.log index 088ea03..09e3d8f 100644 --- a/examples/fs-read-async/node.js.log +++ b/examples/fs-read-async/node.js.log @@ -1,15 +1,15 @@ -readFile x 23,132 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(39.48us ... 46.20us) p75=43.49us p99=46.20us -readFile utf-8 x 22,896 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(41.83us ... 45.49us) p75=43.71us p99=45.49us -[managed] readFile x 23,251 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.53us ... 43.04us) p75=42.93us p99=43.04us -[managed] readFile utf-8 x 23,293 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.63us ... 43.13us) p75=43.09us p99=43.13us +readFile x 23,435 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.47us ... 42.82us) p75=42.76us p99=42.82us +readFile utf-8 x 23,197 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.81us ... 44.06us) p75=43.41us p99=44.06us +[managed] readFile x 23,480 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.38us ... 42.79us) p75=42.68us p99=42.79us +[managed] readFile utf-8 x 23,569 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.14us ... 42.65us) p75=42.57us p99=42.65us ---------------------------------------------------------------------------- -readFile x 22,788 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.63us ... 47.69us) p75=45.63us p99=47.69us -readFile utf-8 x 23,106 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.52us ... 44.58us) p75=44.06us p99=44.58us -[managed] readFile x 23,477 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.33us ... 43.15us) p75=42.75us p99=43.15us -[managed] readFile utf-8 x 23,545 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.29us ... 42.61us) p75=42.51us p99=42.61us +readFile x 23,475 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.44us ... 42.81us) p75=42.69us p99=42.81us +readFile utf-8 x 23,276 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.61us ... 43.40us) p75=43.12us p99=43.40us +[managed] readFile x 23,467 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.24us ... 43.04us) p75=42.87us p99=43.04us +[managed] readFile utf-8 x 23,554 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.17us ... 42.81us) p75=42.56us p99=42.81us ---------------------------------------------------------------------------- -readFile x 22,845 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.43us ... 48.12us) p75=45.39us p99=48.12us -readFile utf-8 x 23,071 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.55us ... 44.61us) p75=44.19us p99=44.61us -[managed] readFile x 23,498 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.18us ... 43.34us) p75=42.81us p99=43.34us -[managed] readFile utf-8 x 23,500 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.37us ... 42.78us) p75=42.72us p99=42.78us +readFile x 23,373 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.34us ... 43.25us) p75=42.96us p99=43.25us +readFile utf-8 x 23,295 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.68us ... 43.12us) p75=43.04us p99=43.12us +[managed] readFile x 23,493 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.04us ... 42.76us) p75=42.75us p99=42.76us +[managed] readFile utf-8 x 23,495 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.34us ... 43.00us) p75=42.79us p99=43.00us ---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.managed.js.log b/examples/fs-read-async/node.managed.js.log index 12e6b31..0f49fdd 100644 --- a/examples/fs-read-async/node.managed.js.log +++ b/examples/fs-read-async/node.managed.js.log @@ -1,9 +1,9 @@ -readFile x 22,852 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(39.46us ... 48.33us) p75=45.33us p99=48.33us -readFile utf-8 x 23,001 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.28us ... 44.69us) p75=44.01us p99=44.69us +readFile x 23,524 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.26us ... 42.77us) p75=42.69us p99=42.77us +readFile utf-8 x 23,435 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.36us ... 43.00us) p75=42.89us p99=43.00us ---------------------------------------------------------------------------- -readFile x 22,857 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.49us ... 48.30us) p75=44.94us p99=48.30us -readFile utf-8 x 23,167 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.20us ... 44.31us) p75=44.03us p99=44.31us +readFile x 23,547 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.26us ... 42.59us) p75=42.54us p99=42.59us +readFile utf-8 x 23,457 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.40us ... 42.96us) p75=42.63us p99=42.96us ---------------------------------------------------------------------------- -readFile x 22,816 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.57us ... 48.07us) p75=45.27us p99=48.07us -readFile utf-8 x 23,273 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.18us ... 44.09us) p75=43.35us p99=44.09us +readFile x 23,281 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.66us ... 43.07us) p75=42.91us p99=43.07us +readFile utf-8 x 23,263 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.68us ... 43.95us) p75=43.28us p99=43.95us ---------------------------------------------------------------------------- diff --git a/examples/fs-read-sync/node.js.log b/examples/fs-read-sync/node.js.log index a89e239..431b7f9 100644 --- a/examples/fs-read-sync/node.js.log +++ b/examples/fs-read-sync/node.js.log @@ -1,15 +1,15 @@ -readFileSync x 195,080 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.04us ... 5.60us) p75=5.09us p99=5.60us -readFileSync utf-8 x 205,245 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.85us ... 4.90us) p75=4.86us p99=4.90us -[Managed] readFileSync x 194,864 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.08us ... 5.28us) p75=5.16us p99=5.28us -[Managed] readFileSync utf-8 x 201,899 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.92us ... 5.00us) p75=4.97us p99=5.00us +readFileSync x 197,074 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.00us ... 5.32us) p75=5.10us p99=5.32us +readFileSync utf-8 x 204,476 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.84us ... 5.03us) p75=4.90us p99=5.03us +[Managed] readFileSync x 194,408 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.09us ... 5.30us) p75=5.18us p99=5.30us +[Managed] readFileSync utf-8 x 202,102 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.91us ... 5.04us) p75=4.98us p99=5.04us ---------------------------------------------------------------------------- -readFileSync x 194,228 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.07us ... 5.29us) p75=5.09us p99=5.29us -readFileSync utf-8 x 205,275 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.84us ... 4.90us) p75=4.88us p99=4.90us -[Managed] readFileSync x 195,645 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.07us ... 5.18us) p75=5.10us p99=5.18us -[Managed] readFileSync utf-8 x 202,022 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.89us ... 5.02us) p75=4.99us p99=5.02us +readFileSync x 194,206 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.28us) p75=5.23us p99=5.28us +readFileSync utf-8 x 204,081 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.83us ... 4.95us) p75=4.88us p99=4.95us +[Managed] readFileSync x 191,810 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.12us ... 5.31us) p75=5.24us p99=5.31us +[Managed] readFileSync utf-8 x 203,058 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.90us ... 4.94us) p75=4.93us p99=4.94us ---------------------------------------------------------------------------- -readFileSync x 194,740 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.16us) p75=5.10us p99=5.16us -readFileSync utf-8 x 205,046 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.84us ... 4.92us) p75=4.88us p99=4.92us -[Managed] readFileSync x 196,632 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.12us) p75=5.08us p99=5.12us -[Managed] readFileSync utf-8 x 203,879 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.87us ... 4.96us) p75=4.94us p99=4.96us +readFileSync x 195,170 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.04us ... 5.33us) p75=5.21us p99=5.33us +readFileSync utf-8 x 206,101 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.83us ... 4.89us) p75=4.87us p99=4.89us +[Managed] readFileSync x 181,989 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.08us ... 5.64us) p75=5.62us p99=5.64us +[Managed] readFileSync utf-8 x 202,834 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.90us ... 4.97us) p75=4.93us p99=4.97us ---------------------------------------------------------------------------- diff --git a/examples/plugins/all.js.log b/examples/plugins/all.js.log index 38411c5..b6ef713 100644 --- a/examples/plugins/all.js.log +++ b/examples/plugins/all.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,922,582 ops/sec (8 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(330.28ns ... 336.04ns) p75=333.42ns p99=336.04ns -[Managed] new Uint32Array(1024) x 2,965,838 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(325.11ns ... 364.01ns) p75=333.88ns p99=364.01ns +new Uint32Array(1024) x 2,885,844 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(333.82ns ... 370.46ns) p75=347.39ns p99=370.46ns +[Managed] new Uint32Array(1024) x 2,898,756 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(335.21ns ... 354.93ns) p75=351.87ns p99=354.93ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,949,878 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(328.98ns ... 356.16ns) p75=342.18ns p99=356.16ns -[Managed] new Uint32Array(1024) x 2,979,929 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(326.47ns ... 359.19ns) p75=343.17ns p99=359.19ns +new Uint32Array(1024) x 2,895,129 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(337.89ns ... 345.07ns) p75=344.33ns p99=345.07ns +[Managed] new Uint32Array(1024) x 2,915,517 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(336.38ns ... 350.44ns) p75=344.21ns p99=350.44ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,952,737 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" v8-never-optimize=true min..max=(330.21ns ... 336.03ns) p75=333.92ns p99=336.03ns -[Managed] new Uint32Array(1024) x 2,947,240 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(332.35ns ... 357.84ns) p75=344.87ns p99=357.84ns +new Uint32Array(1024) x 2,900,586 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(329.57ns ... 397.09ns) p75=353.49ns p99=397.09ns +[Managed] new Uint32Array(1024) x 3,019,826 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(327.16ns ... 332.27ns) p75=331.28ns p99=332.27ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-get-opt-status.js.log b/examples/plugins/v8-get-opt-status.js.log index 6af85b6..0c011b8 100644 --- a/examples/plugins/v8-get-opt-status.js.log +++ b/examples/plugins/v8-get-opt-status.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 3,027,914 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(321.84ns ... 327.42ns) p75=325.05ns p99=327.42ns -[Managed] new Uint32Array(1024) x 3,002,388 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(325.66ns ... 351.89ns) p75=329.63ns p99=351.89ns +new Uint32Array(1024) x 2,825,533 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(341.13ns ... 376.43ns) p75=358.46ns p99=376.43ns +[Managed] new Uint32Array(1024) x 3,004,200 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(326.46ns ... 341.20ns) p75=337.49ns p99=341.20ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,962,416 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(327.29ns ... 341.52ns) p75=335.57ns p99=341.52ns -[Managed] new Uint32Array(1024) x 2,933,543 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(333.47ns ... 347.78ns) p75=340.07ns p99=347.78ns +new Uint32Array(1024) x 2,884,032 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.65ns ... 371.68ns) p75=352.74ns p99=371.68ns +[Managed] new Uint32Array(1024) x 2,817,664 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(349.62ns ... 360.14ns) p75=354.75ns p99=360.14ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,957,336 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization" min..max=(326.98ns ... 350.76ns) p75=336.85ns p99=350.76ns -[Managed] new Uint32Array(1024) x 2,970,617 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.28ns ... 336.22ns) p75=334.68ns p99=336.22ns +new Uint32Array(1024) x 2,970,389 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(325.26ns ... 347.79ns) p75=336.40ns p99=347.79ns +[Managed] new Uint32Array(1024) x 2,976,688 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.68ns ... 345.54ns) p75=339.89ns p99=345.54ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-never-optimize.js.log b/examples/plugins/v8-never-optimize.js.log index 9586759..95d8414 100644 --- a/examples/plugins/v8-never-optimize.js.log +++ b/examples/plugins/v8-never-optimize.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,898,778 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(329.49ns ... 351.31ns) p75=345.73ns p99=351.31ns -[Managed] new Uint32Array(1024) x 2,986,941 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(327.36ns ... 355.02ns) p75=343.92ns p99=355.02ns +new Uint32Array(1024) x 2,858,211 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(342.96ns ... 359.51ns) p75=351.91ns p99=359.51ns +[Managed] new Uint32Array(1024) x 2,917,972 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(339.27ns ... 354.10ns) p75=341.95ns p99=354.10ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,932,389 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(327.69ns ... 352.17ns) p75=341.07ns p99=352.17ns -[Managed] new Uint32Array(1024) x 3,005,432 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(330.33ns ... 333.30ns) p75=332.75ns p99=333.30ns +new Uint32Array(1024) x 2,745,813 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(332.43ns ... 374.97ns) p75=347.63ns p99=374.97ns +[Managed] new Uint32Array(1024) x 2,932,804 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(333.84ns ... 360.09ns) p75=346.94ns p99=360.09ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,941,011 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.60ns ... 353.39ns) p75=343.77ns p99=353.39ns -[Managed] new Uint32Array(1024) x 3,020,232 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.83ns ... 331.68ns) p75=331.36ns p99=331.68ns +new Uint32Array(1024) x 2,909,646 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(328.42ns ... 361.17ns) p75=358.24ns p99=361.17ns +[Managed] new Uint32Array(1024) x 2,871,802 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(337.31ns ... 364.44ns) p75=353.42ns p99=364.44ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-optimize-next-call.js.log b/examples/plugins/v8-optimize-next-call.js.log index 2d56dee..3427174 100644 --- a/examples/plugins/v8-optimize-next-call.js.log +++ b/examples/plugins/v8-optimize-next-call.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,952,682 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(326.82ns ... 356.47ns) p75=340.14ns p99=356.47ns -[Managed] new Uint32Array(1024) x 2,948,792 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(330.52ns ... 360.90ns) p75=355.11ns p99=360.90ns +new Uint32Array(1024) x 2,972,791 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(334.27ns ... 339.62ns) p75=337.85ns p99=339.62ns +[Managed] new Uint32Array(1024) x 2,908,439 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(332.80ns ... 358.40ns) p75=348.46ns p99=358.40ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,923,303 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(328.18ns ... 354.53ns) p75=338.46ns p99=354.53ns -[Managed] new Uint32Array(1024) x 2,937,429 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(331.77ns ... 345.95ns) p75=340.34ns p99=345.95ns +new Uint32Array(1024) x 2,982,540 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(332.85ns ... 336.37ns) p75=335.21ns p99=336.37ns +[Managed] new Uint32Array(1024) x 2,919,974 ops/sec (9 runs sampled) v8-optimize-next-call=enabled min..max=(335.30ns ... 346.51ns) p75=343.26ns p99=346.51ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,920,072 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(327.46ns ... 358.16ns) p75=345.19ns p99=358.16ns -[Managed] new Uint32Array(1024) x 2,935,742 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(332.38ns ... 352.88ns) p75=345.28ns p99=352.88ns +new Uint32Array(1024) x 2,960,287 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(333.25ns ... 341.07ns) p75=339.38ns p99=341.07ns +[Managed] new Uint32Array(1024) x 2,892,614 ops/sec (8 runs sampled) v8-optimize-next-call=enabled min..max=(342.87ns ... 347.34ns) p75=344.64ns p99=347.34ns ---------------------------------------------------------------------------- diff --git a/examples/string-replace/node.js.log b/examples/string-replace/node.js.log index 2b30d17..c1e70a3 100644 --- a/examples/string-replace/node.js.log +++ b/examples/string-replace/node.js.log @@ -1,15 +1,15 @@ -single with matcher x 739,414 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.34us ... 1.39us) p75=1.34us p99=1.39us -multiple replaces x 629,147 ops/sec (13 runs sampled) v8-never-optimize=true min..max=(1.47us ... 1.66us) p75=1.63us p99=1.66us -[Managed] single with matcher x 759,021 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.33us) p75=1.32us p99=1.33us -[Managed] multiple replaces x 643,853 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.55us) p75=1.55us p99=1.55us +single with matcher x 756,264 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.32us) p75=1.32us p99=1.32us +multiple replaces x 640,863 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.58us) p75=1.57us p99=1.58us +[Managed] single with matcher x 772,463 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.30us) p75=1.30us p99=1.30us +[Managed] multiple replaces x 643,205 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.58us) p75=1.56us p99=1.58us ---------------------------------------------------------------------------- -single with matcher x 749,446 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.36us) p75=1.33us p99=1.36us -multiple replaces x 622,863 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.76us) p75=1.65us p99=1.76us -[Managed] single with matcher x 774,824 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.29us) p75=1.29us p99=1.29us -[Managed] multiple replaces x 643,085 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.56us) p75=1.55us p99=1.56us +single with matcher x 762,839 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.31us) p75=1.31us p99=1.31us +multiple replaces x 641,355 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.57us) p75=1.57us p99=1.57us +[Managed] single with matcher x 776,942 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.28us ... 1.29us) p75=1.29us p99=1.29us +[Managed] multiple replaces x 642,766 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.57us) p75=1.56us p99=1.57us ---------------------------------------------------------------------------- -single with matcher x 751,805 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.33us) p75=1.33us p99=1.33us -multiple replaces x 610,876 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.47us ... 1.71us) p75=1.63us p99=1.71us -[Managed] single with matcher x 773,721 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.30us) p75=1.29us p99=1.30us -[Managed] multiple replaces x 643,996 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.57us) p75=1.55us p99=1.57us +single with matcher x 759,956 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.32us) p75=1.32us p99=1.32us +multiple replaces x 640,300 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.56us) p75=1.56us p99=1.56us +[Managed] single with matcher x 770,091 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.30us ... 1.30us) p75=1.30us p99=1.30us +[Managed] multiple replaces x 642,915 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.57us) p75=1.56us p99=1.57us ---------------------------------------------------------------------------- diff --git a/examples/string-searching/node.js.log b/examples/string-searching/node.js.log index 32ba47a..10b0b3d 100644 --- a/examples/string-searching/node.js.log +++ b/examples/string-searching/node.js.log @@ -1,21 +1,21 @@ -Using includes x 216,514,984 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.52ns ... 5.03ns) p75=4.62ns p99=5.03ns -Using indexof x 131,207,112 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.57ns ... 7.68ns) p75=7.61ns p99=7.68ns -Using cached RegExp.test x 19,879,400 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.18ns ... 50.35ns) p75=50.30ns p99=50.35ns -[Managed] Using includes x 2,308,493,562 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,321,058,069 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,712,159 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(40.25ns ... 40.69ns) p75=40.45ns p99=40.69ns +Using includes x 129,501,075 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.69ns ... 7.82ns) p75=7.76ns p99=7.82ns +Using indexof x 128,393,723 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.76ns ... 7.81ns) p75=7.79ns p99=7.81ns +Using cached RegExp.test x 19,845,442 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(50.24ns ... 50.55ns) p75=50.37ns p99=50.55ns +[Managed] Using includes x 2,265,019,076 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,262,167,620 ops/sec (16 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,798,994 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.13ns ... 40.38ns) p75=40.36ns p99=40.38ns ---------------------------------------------------------------------------- -Using includes x 216,748,330 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.53ns ... 4.81ns) p75=4.62ns p99=4.81ns -Using indexof x 130,686,026 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.82ns) p75=7.64ns p99=7.82ns -Using cached RegExp.test x 19,915,831 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.08ns ... 50.30ns) p75=50.25ns p99=50.30ns -[Managed] Using includes x 2,312,395,350 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,321,453,259 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,858,397 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.00ns ... 41.02ns) p75=40.30ns p99=41.02ns +Using includes x 130,419,486 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.63ns ... 7.74ns) p75=7.70ns p99=7.74ns +Using indexof x 131,332,101 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.63ns) p75=7.62ns p99=7.63ns +Using cached RegExp.test x 19,832,966 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(50.23ns ... 50.84ns) p75=50.45ns p99=50.84ns +[Managed] Using includes x 2,266,276,771 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,263,402,611 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,835,619 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.18ns ... 40.45ns) p75=40.37ns p99=40.45ns ---------------------------------------------------------------------------- -Using includes x 216,731,820 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.53ns ... 4.80ns) p75=4.63ns p99=4.80ns -Using indexof x 131,345,255 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.57ns ... 7.66ns) p75=7.62ns p99=7.66ns -Using cached RegExp.test x 19,861,824 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(50.29ns ... 50.44ns) p75=50.33ns p99=50.44ns -[Managed] Using includes x 2,293,197,582 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,319,938,438 ops/sec (16 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,785,474 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(39.99ns ... 40.96ns) p75=40.26ns p99=40.96ns +Using includes x 131,655,088 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.56ns ... 7.68ns) p75=7.63ns p99=7.68ns +Using indexof x 131,260,171 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.63ns) p75=7.62ns p99=7.63ns +Using cached RegExp.test x 19,899,089 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.11ns ... 50.62ns) p75=50.40ns p99=50.62ns +[Managed] Using includes x 2,292,024,817 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,320,347,063 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,799,003 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.27ns ... 40.39ns) p75=40.36ns p99=40.39ns ---------------------------------------------------------------------------- From ba874a7fc330bf6f163e22d863c3d38d66d7ea85 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 15 Oct 2024 00:55:05 -0300 Subject: [PATCH 3/6] lib: add warmup full-run instead of a single run This should fix https://github.com/RafaelGSS/bench-node/issues/12. Where the code passes from Baseline to Interpreted a few times creating a variance for the first benchmark. --- lib/index.js | 11 +++++++++-- lib/lifecycle.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7585db9..da6c8df 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ const { reportConsoleBench } = require('./report'); -const { getInitialIterations, runBenchmark } = require('./lifecycle'); +const { getInitialIterations, runBenchmark, runWarmup } = require('./lifecycle'); const { debugBench, timer } = require('./clock'); const { validatePlugins, @@ -99,11 +99,18 @@ class Suite { throwIfNoNativesSyntax(); const results = new Array(this.#benchmarks.length); + // This is required to avoid variance on first benchmark run for (let i = 0; i < this.#benchmarks.length; ++i) { const benchmark = this.#benchmarks[i]; - // Warmup is calculated to reduce noise/bias on the results + debugBench(`Warmup ${ benchmark.name } with minTime=${ benchmark.minTime }, maxTime=${ benchmark.maxTime }`); const initialIteration = await getInitialIterations(benchmark); + await runWarmup(benchmark, initialIteration, { minTime: 0.005, maxTime: 0.05 }); + } + for (let i = 0; i < this.#benchmarks.length; ++i) { + const benchmark = this.#benchmarks[i]; + // Warmup is calculated to reduce noise/bias on the results + const initialIteration = await getInitialIterations(benchmark); debugBench(`Starting ${ benchmark.name } with minTime=${ benchmark.minTime }, maxTime=${ benchmark.maxTime }`); const result = await runBenchmark(benchmark, initialIteration); results[i] = result; diff --git a/lib/lifecycle.js b/lib/lifecycle.js index 0a9fe2b..483c091 100644 --- a/lib/lifecycle.js +++ b/lib/lifecycle.js @@ -33,6 +33,33 @@ async function getInitialIterations(bench) { return getItersForOpDuration(durationPerOp, bench.minTime); } +async function runWarmup(bench, initialIterations, { minTime, maxTime }) { + minTime = minTime ?? bench.minTime; + maxTime = maxTime ?? bench.minTime; + + const maxDuration = maxTime * timer.scale; + const minSamples = 10; + + let iterations = 0; + let timeSpent = 0; + let samples = 0; + + while (timeSpent < maxDuration || samples <= minSamples) { + const { 0: duration, 1: realIterations } = await clockBenchmark(bench, initialIterations); + timeSpent += duration + + iterations += realIterations; + iterations = Math.min(Number.MAX_SAFE_INTEGER, iterations); + + // Just to avoid issues with empty fn + const durationPerOp = Math.max(MIN_RESOLUTION, duration / realIterations); + + const minWindowTime = Math.max(0, Math.min((maxDuration - timeSpent) / timer.scale, minTime)); + initialIterations = getItersForOpDuration(durationPerOp, minWindowTime); + samples++; + } +} + async function runBenchmark(bench, initialIterations) { const histogram = new StatisticalHistogram(); @@ -73,4 +100,5 @@ async function runBenchmark(bench, initialIterations) { module.exports = { getInitialIterations, runBenchmark, + runWarmup, }; From 6b93516908ff35d9e7e0f888d02ebba86f2d8ab2 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 15 Oct 2024 00:56:48 -0300 Subject: [PATCH 4/6] examples: add last run with runWarmup function --- examples/create-uint32array/node.js.log | 12 +++--- examples/crypto-verify/node.js.log | 24 +++++------ examples/deleting-properties/node.js.log | 42 +++++++++---------- examples/empty/node.js.log | 12 +++--- examples/fs-read-async/node.js.log | 24 +++++------ examples/fs-read-async/node.managed.js.log | 12 +++--- examples/fs-read-sync/node.js.log | 24 +++++------ examples/plugins/all.js.log | 12 +++--- examples/plugins/v8-get-opt-status.js.log | 12 +++--- examples/plugins/v8-never-optimize.js.log | 12 +++--- examples/plugins/v8-optimize-next-call.js.log | 12 +++--- examples/string-replace/node.js.log | 24 +++++------ examples/string-searching/node.js.log | 36 ++++++++-------- 13 files changed, 129 insertions(+), 129 deletions(-) diff --git a/examples/create-uint32array/node.js.log b/examples/create-uint32array/node.js.log index a00113e..4d729cc 100644 --- a/examples/create-uint32array/node.js.log +++ b/examples/create-uint32array/node.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 3,043,009 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(324.52ns ... 330.78ns) p75=329.40ns p99=330.78ns -[Managed] new Uint32Array(1024) x 2,973,065 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(328.56ns ... 354.73ns) p75=342.17ns p99=354.73ns +new Uint32Array(1024) x 2,930,763 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(332.08ns ... 355.52ns) p75=344.36ns p99=355.52ns +[Managed] new Uint32Array(1024) x 2,934,651 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(335.94ns ... 357.76ns) p75=340.16ns p99=357.76ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,945,725 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(326.29ns ... 356.17ns) p75=335.18ns p99=356.17ns -[Managed] new Uint32Array(1024) x 2,855,082 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(334.81ns ... 359.21ns) p75=350.26ns p99=359.21ns +new Uint32Array(1024) x 2,967,727 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(330.75ns ... 337.55ns) p75=334.98ns p99=337.55ns +[Managed] new Uint32Array(1024) x 3,029,150 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(326.51ns ... 341.28ns) p75=331.01ns p99=341.28ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,994,155 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(327.63ns ... 339.22ns) p75=336.48ns p99=339.22ns -[Managed] new Uint32Array(1024) x 2,936,781 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(333.72ns ... 348.28ns) p75=340.69ns p99=348.28ns +new Uint32Array(1024) x 2,920,851 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(332.88ns ... 363.08ns) p75=348.19ns p99=363.08ns +[Managed] new Uint32Array(1024) x 3,032,256 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(327.13ns ... 343.75ns) p75=329.19ns p99=343.75ns ---------------------------------------------------------------------------- diff --git a/examples/crypto-verify/node.js.log b/examples/crypto-verify/node.js.log index bbc11b7..84d1227 100644 --- a/examples/crypto-verify/node.js.log +++ b/examples/crypto-verify/node.js.log @@ -1,15 +1,15 @@ -crypto.createVerify('RSA-SHA256') x 11,027 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(87.67us ... 91.64us) p75=91.13us p99=91.64us -crypto.verify('RSA-SHA256') x 10,779 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(88.53us ... 95.15us) p75=93.88us p99=95.15us -[Managed] crypto.createVerify('RSA-SHA256') x 10,701 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(92.04us ... 94.72us) p75=94.27us p99=94.72us -[Managed] crypto.verify('RSA-SHA256') x 10,716 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(91.74us ... 94.90us) p75=93.47us p99=94.90us +crypto.createVerify('RSA-SHA256') x 10,925 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.50us ... 93.51us) p75=91.54us p99=93.51us +crypto.verify('RSA-SHA256') x 10,988 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(90.93us ... 91.84us) p75=91.58us p99=91.84us +[Managed] crypto.createVerify('RSA-SHA256') x 10,520 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(88.44us ... 92.23us) p75=91.47us p99=92.23us +[Managed] crypto.verify('RSA-SHA256') x 10,948 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(89.98us ... 92.36us) p75=91.49us p99=92.36us ---------------------------------------------------------------------------- -crypto.createVerify('RSA-SHA256') x 10,975 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(89.66us ... 92.46us) p75=91.28us p99=92.46us -crypto.verify('RSA-SHA256') x 10,724 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(91.51us ... 95.02us) p75=94.05us p99=95.02us -[Managed] crypto.createVerify('RSA-SHA256') x 10,905 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(90.14us ... 93.21us) p75=91.97us p99=93.21us -[Managed] crypto.verify('RSA-SHA256') x 10,655 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(93.30us ... 94.30us) p75=94.00us p99=94.30us +crypto.createVerify('RSA-SHA256') x 10,807 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(91.66us ... 92.58us) p75=92.23us p99=92.58us +crypto.verify('RSA-SHA256') x 10,964 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(88.95us ... 92.46us) p75=91.83us p99=92.46us +[Managed] crypto.createVerify('RSA-SHA256') x 10,954 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(90.08us ... 92.88us) p75=91.72us p99=92.88us +[Managed] crypto.verify('RSA-SHA256') x 10,990 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(90.31us ... 92.43us) p75=91.43us p99=92.43us ---------------------------------------------------------------------------- -crypto.createVerify('RSA-SHA256') x 10,748 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(92.83us ... 94.42us) p75=93.88us p99=94.42us -crypto.verify('RSA-SHA256') x 10,689 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.92us ... 95.82us) p75=94.17us p99=95.82us -[Managed] crypto.createVerify('RSA-SHA256') x 10,852 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(88.14us ... 94.10us) p75=93.77us p99=94.10us -[Managed] crypto.verify('RSA-SHA256') x 10,867 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(90.40us ... 94.64us) p75=92.81us p99=94.64us +crypto.createVerify('RSA-SHA256') x 10,890 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(87.88us ... 94.08us) p75=92.96us p99=94.08us +crypto.verify('RSA-SHA256') x 10,906 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(91.03us ... 92.45us) p75=91.66us p99=92.45us +[Managed] crypto.createVerify('RSA-SHA256') x 11,050 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(87.94us ... 92.09us) p75=91.88us p99=92.09us +[Managed] crypto.verify('RSA-SHA256') x 10,990 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(90.29us ... 92.13us) p75=91.92us p99=92.13us ---------------------------------------------------------------------------- diff --git a/examples/deleting-properties/node.js.log b/examples/deleting-properties/node.js.log index 7319ba5..14e211a 100644 --- a/examples/deleting-properties/node.js.log +++ b/examples/deleting-properties/node.js.log @@ -1,24 +1,24 @@ -Using delete property x 7,832,497 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(127.40ns ... 128.26ns) p75=128.00ns p99=128.26ns -Using delete property (proto: null) x 23,423,727 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.46ns ... 43.18ns) p75=42.99ns p99=43.18ns -Using delete property (cached proto: null) x 7,367,072 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(134.93ns ... 137.35ns) p75=136.11ns p99=137.35ns -Using undefined assignment x 132,292,865 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.53ns ... 7.60ns) p75=7.56ns p99=7.60ns -Using undefined assignment (proto: null) x 25,594,832 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.90ns ... 39.38ns) p75=39.16ns p99=39.38ns -Using undefined property (cached proto: null) x 58,328,070 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(17.04ns ... 17.29ns) p75=17.22ns p99=17.29ns -[Managed] Using undefined property (cached proto: null) x 35,588,926 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(28.01ns ... 28.18ns) p75=28.13ns p99=28.18ns +Using delete property x 7,763,866 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(128.11ns ... 129.99ns) p75=129.03ns p99=129.99ns +Using delete property (proto: null) x 22,946,068 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(43.13ns ... 44.11ns) p75=43.74ns p99=44.11ns +Using delete property (cached proto: null) x 7,331,951 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(135.64ns ... 137.39ns) p75=136.52ns p99=137.39ns +Using undefined assignment x 133,449,849 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.45ns ... 7.56ns) p75=7.53ns p99=7.56ns +Using undefined assignment (proto: null) x 25,432,632 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.72ns ... 40.06ns) p75=39.60ns p99=40.06ns +Using undefined property (cached proto: null) x 58,871,059 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.92ns ... 17.12ns) p75=17.01ns p99=17.12ns +[Managed] Using undefined property (cached proto: null) x 35,463,712 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(28.05ns ... 28.43ns) p75=28.25ns p99=28.43ns ---------------------------------------------------------------------------- -Using delete property x 7,814,608 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(127.50ns ... 128.30ns) p75=128.25ns p99=128.30ns -Using delete property (proto: null) x 23,431,652 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.51ns ... 42.97ns) p75=42.83ns p99=42.97ns -Using delete property (cached proto: null) x 7,305,690 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(136.22ns ... 137.59ns) p75=137.37ns p99=137.59ns -Using undefined assignment x 129,085,327 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.72ns ... 7.83ns) p75=7.76ns p99=7.83ns -Using undefined assignment (proto: null) x 25,629,477 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.79ns ... 39.27ns) p75=39.08ns p99=39.27ns -Using undefined property (cached proto: null) x 58,340,080 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.93ns ... 17.45ns) p75=17.12ns p99=17.45ns -[Managed] Using undefined property (cached proto: null) x 35,547,235 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(27.90ns ... 28.77ns) p75=28.29ns p99=28.77ns +Using delete property x 6,669,856 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(149.14ns ... 151.02ns) p75=150.12ns p99=151.02ns +Using delete property (proto: null) x 15,242,131 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(64.77ns ... 66.38ns) p75=66.25ns p99=66.38ns +Using delete property (cached proto: null) x 5,920,843 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(167.87ns ... 170.33ns) p75=169.07ns p99=170.33ns +Using undefined assignment x 78,647,245 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(12.62ns ... 12.83ns) p75=12.70ns p99=12.83ns +Using undefined assignment (proto: null) x 16,278,910 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(60.79ns ... 62.25ns) p75=61.57ns p99=62.25ns +Using undefined property (cached proto: null) x 27,262,884 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(36.54ns ... 36.65ns) p75=36.62ns p99=36.65ns +[Managed] Using undefined property (cached proto: null) x 28,068,785 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(35.07ns ... 35.79ns) p75=35.67ns p99=35.79ns ---------------------------------------------------------------------------- -Using delete property x 7,767,423 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(128.28ns ... 129.20ns) p75=129.00ns p99=129.20ns -Using delete property (proto: null) x 23,253,711 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.62ns ... 43.55ns) p75=43.22ns p99=43.55ns -Using delete property (cached proto: null) x 7,260,588 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(136.48ns ... 137.72ns) p75=137.47ns p99=137.72ns -Using undefined assignment x 125,714,722 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.55ns ... 7.61ns) p75=7.59ns p99=7.61ns -Using undefined assignment (proto: null) x 25,970,526 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(38.33ns ... 38.78ns) p75=38.56ns p99=38.78ns -Using undefined property (cached proto: null) x 54,970,601 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(17.18ns ... 17.27ns) p75=17.23ns p99=17.27ns -[Managed] Using undefined property (cached proto: null) x 35,471,223 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(28.04ns ... 28.47ns) p75=28.31ns p99=28.47ns +Using delete property x 7,632,095 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(129.63ns ... 132.85ns) p75=131.19ns p99=132.85ns +Using delete property (proto: null) x 23,040,357 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(43.06ns ... 44.20ns) p75=43.56ns p99=44.20ns +Using delete property (cached proto: null) x 7,222,103 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(137.05ns ... 139.88ns) p75=139.18ns p99=139.88ns +Using undefined assignment x 133,133,677 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.49ns ... 7.53ns) p75=7.52ns p99=7.53ns +Using undefined assignment (proto: null) x 25,217,884 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(39.24ns ... 40.48ns) p75=39.89ns p99=40.48ns +Using undefined property (cached proto: null) x 58,899,972 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(16.94ns ... 17.03ns) p75=16.99ns p99=17.03ns +[Managed] Using undefined property (cached proto: null) x 34,904,120 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(28.34ns ... 29.89ns) p75=28.84ns p99=29.89ns ---------------------------------------------------------------------------- diff --git a/examples/empty/node.js.log b/examples/empty/node.js.log index 11a8671..d67c390 100644 --- a/examples/empty/node.js.log +++ b/examples/empty/node.js.log @@ -1,9 +1,9 @@ -empty x 219,338,475 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.65ns) p75=4.59ns p99=4.65ns -empty async x 22,667,494 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(43.55ns ... 44.19ns) p75=43.95ns p99=44.19ns +empty x 218,984,985 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.53ns ... 4.66ns) p75=4.58ns p99=4.66ns +empty async x 20,898,403 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(47.46ns ... 48.57ns) p75=48.04ns p99=48.57ns ---------------------------------------------------------------------------- -empty x 221,169,832 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.53ns) p75=4.52ns p99=4.53ns -empty async x 21,007,759 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(46.85ns ... 50.78ns) p75=47.24ns p99=50.78ns +empty x 220,571,877 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.49ns ... 4.61ns) p75=4.58ns p99=4.61ns +empty async x 20,925,022 ops/sec (14 runs sampled) v8-never-optimize=true min..max=(37.43ns ... 48.60ns) p75=48.03ns p99=48.60ns ---------------------------------------------------------------------------- -empty x 221,155,223 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.51ns ... 4.54ns) p75=4.53ns p99=4.54ns -empty async x 22,406,761 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(41.36ns ... 45.44ns) p75=44.86ns p99=45.44ns +empty x 218,923,690 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.52ns ... 4.64ns) p75=4.59ns p99=4.64ns +empty async x 20,792,931 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.94ns ... 49.45ns) p75=48.54ns p99=49.45ns ---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.js.log b/examples/fs-read-async/node.js.log index 09e3d8f..a75c728 100644 --- a/examples/fs-read-async/node.js.log +++ b/examples/fs-read-async/node.js.log @@ -1,15 +1,15 @@ -readFile x 23,435 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.47us ... 42.82us) p75=42.76us p99=42.82us -readFile utf-8 x 23,197 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.81us ... 44.06us) p75=43.41us p99=44.06us -[managed] readFile x 23,480 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.38us ... 42.79us) p75=42.68us p99=42.79us -[managed] readFile utf-8 x 23,569 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.14us ... 42.65us) p75=42.57us p99=42.65us +readFile x 23,167 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.59us ... 43.59us) p75=43.42us p99=43.59us +readFile utf-8 x 23,021 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(43.14us ... 43.92us) p75=43.64us p99=43.92us +[managed] readFile x 23,386 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.63us ... 43.04us) p75=42.89us p99=43.04us +[managed] readFile utf-8 x 23,302 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.76us ... 43.30us) p75=43.01us p99=43.30us ---------------------------------------------------------------------------- -readFile x 23,475 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.44us ... 42.81us) p75=42.69us p99=42.81us -readFile utf-8 x 23,276 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.61us ... 43.40us) p75=43.12us p99=43.40us -[managed] readFile x 23,467 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.24us ... 43.04us) p75=42.87us p99=43.04us -[managed] readFile utf-8 x 23,554 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.17us ... 42.81us) p75=42.56us p99=42.81us +readFile x 23,177 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.70us ... 43.54us) p75=43.31us p99=43.54us +readFile utf-8 x 23,155 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.34us ... 43.53us) p75=43.15us p99=43.53us +[managed] readFile x 23,538 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.22us ... 42.82us) p75=42.59us p99=42.82us +[managed] readFile utf-8 x 23,458 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.11us ... 43.20us) p75=42.86us p99=43.20us ---------------------------------------------------------------------------- -readFile x 23,373 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(42.34us ... 43.25us) p75=42.96us p99=43.25us -readFile utf-8 x 23,295 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.68us ... 43.12us) p75=43.04us p99=43.12us -[managed] readFile x 23,493 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.04us ... 42.76us) p75=42.75us p99=42.76us -[managed] readFile utf-8 x 23,495 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.34us ... 43.00us) p75=42.79us p99=43.00us +readFile x 23,235 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.73us ... 43.41us) p75=43.17us p99=43.41us +readFile utf-8 x 23,130 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.90us ... 44.40us) p75=43.62us p99=44.40us +[managed] readFile x 23,490 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.40us ... 42.89us) p75=42.66us p99=42.89us +[managed] readFile utf-8 x 23,553 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(41.99us ... 42.81us) p75=42.58us p99=42.81us ---------------------------------------------------------------------------- diff --git a/examples/fs-read-async/node.managed.js.log b/examples/fs-read-async/node.managed.js.log index 0f49fdd..32c728c 100644 --- a/examples/fs-read-async/node.managed.js.log +++ b/examples/fs-read-async/node.managed.js.log @@ -1,9 +1,9 @@ -readFile x 23,524 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.26us ... 42.77us) p75=42.69us p99=42.77us -readFile utf-8 x 23,435 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.36us ... 43.00us) p75=42.89us p99=43.00us +readFile x 23,066 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.59us ... 43.63us) p75=43.20us p99=43.63us +readFile utf-8 x 23,334 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.21us ... 43.70us) p75=42.96us p99=43.70us ---------------------------------------------------------------------------- -readFile x 23,547 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.26us ... 42.59us) p75=42.54us p99=42.59us -readFile utf-8 x 23,457 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.40us ... 42.96us) p75=42.63us p99=42.96us +readFile x 23,145 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.64us ... 43.18us) p75=43.04us p99=43.18us +readFile utf-8 x 23,324 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.54us ... 43.80us) p75=42.93us p99=43.80us ---------------------------------------------------------------------------- -readFile x 23,281 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(42.66us ... 43.07us) p75=42.91us p99=43.07us -readFile utf-8 x 23,263 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(42.68us ... 43.95us) p75=43.28us p99=43.95us +readFile x 23,124 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(42.36us ... 43.30us) p75=42.99us p99=43.30us +readFile utf-8 x 23,277 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(41.50us ... 43.88us) p75=42.98us p99=43.88us ---------------------------------------------------------------------------- diff --git a/examples/fs-read-sync/node.js.log b/examples/fs-read-sync/node.js.log index 431b7f9..6e80770 100644 --- a/examples/fs-read-sync/node.js.log +++ b/examples/fs-read-sync/node.js.log @@ -1,15 +1,15 @@ -readFileSync x 197,074 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.00us ... 5.32us) p75=5.10us p99=5.32us -readFileSync utf-8 x 204,476 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(4.84us ... 5.03us) p75=4.90us p99=5.03us -[Managed] readFileSync x 194,408 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.09us ... 5.30us) p75=5.18us p99=5.30us -[Managed] readFileSync utf-8 x 202,102 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.91us ... 5.04us) p75=4.98us p99=5.04us +readFileSync x 198,828 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.01us ... 5.06us) p75=5.04us p99=5.06us +readFileSync utf-8 x 203,828 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.88us ... 4.94us) p75=4.92us p99=4.94us +[Managed] readFileSync x 196,632 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.08us) p75=5.07us p99=5.08us +[Managed] readFileSync utf-8 x 203,265 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(4.89us ... 4.92us) p75=4.91us p99=4.92us ---------------------------------------------------------------------------- -readFileSync x 194,206 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.28us) p75=5.23us p99=5.28us -readFileSync utf-8 x 204,081 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.83us ... 4.95us) p75=4.88us p99=4.95us -[Managed] readFileSync x 191,810 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.12us ... 5.31us) p75=5.24us p99=5.31us -[Managed] readFileSync utf-8 x 203,058 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.90us ... 4.94us) p75=4.93us p99=4.94us +readFileSync x 198,461 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(5.00us ... 5.05us) p75=5.02us p99=5.05us +readFileSync utf-8 x 205,171 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.82us ... 4.86us) p75=4.86us p99=4.86us +[Managed] readFileSync x 193,061 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.05us ... 5.48us) p75=5.30us p99=5.48us +[Managed] readFileSync utf-8 x 204,046 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.86us ... 4.92us) p75=4.91us p99=4.92us ---------------------------------------------------------------------------- -readFileSync x 195,170 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.04us ... 5.33us) p75=5.21us p99=5.33us -readFileSync utf-8 x 206,101 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.83us ... 4.89us) p75=4.87us p99=4.89us -[Managed] readFileSync x 181,989 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.08us ... 5.64us) p75=5.62us p99=5.64us -[Managed] readFileSync utf-8 x 202,834 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.90us ... 4.97us) p75=4.93us p99=4.97us +readFileSync x 196,533 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(5.02us ... 5.20us) p75=5.10us p99=5.20us +readFileSync utf-8 x 205,213 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(4.83us ... 4.89us) p75=4.86us p99=4.89us +[Managed] readFileSync x 183,333 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(5.06us ... 6.46us) p75=5.28us p99=6.46us +[Managed] readFileSync utf-8 x 201,593 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(4.90us ... 5.07us) p75=5.06us p99=5.07us ---------------------------------------------------------------------------- diff --git a/examples/plugins/all.js.log b/examples/plugins/all.js.log index b6ef713..19c57f6 100644 --- a/examples/plugins/all.js.log +++ b/examples/plugins/all.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,885,844 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(333.82ns ... 370.46ns) p75=347.39ns p99=370.46ns -[Managed] new Uint32Array(1024) x 2,898,756 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(335.21ns ... 354.93ns) p75=351.87ns p99=354.93ns +new Uint32Array(1024) x 2,395,395 ops/sec (14 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(302.80ns ... 435.20ns) p75=420.50ns p99=435.20ns +[Managed] new Uint32Array(1024) x 1,878,469 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(217.82ns ... 577.91ns) p75=430.46ns p99=577.91ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,895,129 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(337.89ns ... 345.07ns) p75=344.33ns p99=345.07ns -[Managed] new Uint32Array(1024) x 2,915,517 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(336.38ns ... 350.44ns) p75=344.21ns p99=350.44ns +new Uint32Array(1024) x 2,282,799 ops/sec (13 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(339.06ns ... 479.78ns) p75=449.29ns p99=479.78ns +[Managed] new Uint32Array(1024) x 2,219,660 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(383.40ns ... 548.65ns) p75=461.81ns p99=548.65ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,900,586 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(329.57ns ... 397.09ns) p75=353.49ns p99=397.09ns -[Managed] new Uint32Array(1024) x 3,019,826 ops/sec (9 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(327.16ns ... 332.27ns) p75=331.28ns p99=332.27ns +new Uint32Array(1024) x 2,362,479 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(384.64ns ... 456.35ns) p75=440.57ns p99=456.35ns +[Managed] new Uint32Array(1024) x 2,272,352 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" v8-never-optimize=true min..max=(421.95ns ... 451.89ns) p75=443.17ns p99=451.89ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-get-opt-status.js.log b/examples/plugins/v8-get-opt-status.js.log index 0c011b8..14b0486 100644 --- a/examples/plugins/v8-get-opt-status.js.log +++ b/examples/plugins/v8-get-opt-status.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,825,533 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(341.13ns ... 376.43ns) p75=358.46ns p99=376.43ns -[Managed] new Uint32Array(1024) x 3,004,200 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(326.46ns ... 341.20ns) p75=337.49ns p99=341.20ns +new Uint32Array(1024) x 2,353,498 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(387.20ns ... 435.11ns) p75=426.25ns p99=435.11ns +[Managed] new Uint32Array(1024) x 2,295,396 ops/sec (12 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(346.78ns ... 471.27ns) p75=450.57ns p99=471.27ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,884,032 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.65ns ... 371.68ns) p75=352.74ns p99=371.68ns -[Managed] new Uint32Array(1024) x 2,817,664 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(349.62ns ... 360.14ns) p75=354.75ns p99=360.14ns +new Uint32Array(1024) x 2,206,492 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(413.34ns ... 498.95ns) p75=457.27ns p99=498.95ns +[Managed] new Uint32Array(1024) x 2,308,235 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(410.95ns ... 472.38ns) p75=444.99ns p99=472.38ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,970,389 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(325.26ns ... 347.79ns) p75=336.40ns p99=347.79ns -[Managed] new Uint32Array(1024) x 2,976,688 ops/sec (10 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(331.68ns ... 345.54ns) p75=339.89ns p99=345.54ns +new Uint32Array(1024) x 2,765,470 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(343.99ns ... 396.13ns) p75=386.55ns p99=396.13ns +[Managed] new Uint32Array(1024) x 2,773,144 ops/sec (11 runs sampled) v8-opt-status="Optimized, Interpreted, Marked for Optimization, Concurrently Optimizing" min..max=(351.75ns ... 377.92ns) p75=369.54ns p99=377.92ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-never-optimize.js.log b/examples/plugins/v8-never-optimize.js.log index 95d8414..18fac40 100644 --- a/examples/plugins/v8-never-optimize.js.log +++ b/examples/plugins/v8-never-optimize.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,858,211 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(342.96ns ... 359.51ns) p75=351.91ns p99=359.51ns -[Managed] new Uint32Array(1024) x 2,917,972 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(339.27ns ... 354.10ns) p75=341.95ns p99=354.10ns +new Uint32Array(1024) x 2,535,349 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(357.30ns ... 442.55ns) p75=416.14ns p99=442.55ns +[Managed] new Uint32Array(1024) x 2,646,454 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(356.81ns ... 405.88ns) p75=382.20ns p99=405.88ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,745,813 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(332.43ns ... 374.97ns) p75=347.63ns p99=374.97ns -[Managed] new Uint32Array(1024) x 2,932,804 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(333.84ns ... 360.09ns) p75=346.94ns p99=360.09ns +new Uint32Array(1024) x 2,785,937 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(350.61ns ... 368.86ns) p75=360.60ns p99=368.86ns +[Managed] new Uint32Array(1024) x 2,535,974 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(353.44ns ... 462.38ns) p75=447.16ns p99=462.38ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,909,646 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(328.42ns ... 361.17ns) p75=358.24ns p99=361.17ns -[Managed] new Uint32Array(1024) x 2,871,802 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(337.31ns ... 364.44ns) p75=353.42ns p99=364.44ns +new Uint32Array(1024) x 2,336,195 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(380.49ns ... 453.11ns) p75=431.40ns p99=453.11ns +[Managed] new Uint32Array(1024) x 2,624,328 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(341.92ns ... 432.82ns) p75=411.22ns p99=432.82ns ---------------------------------------------------------------------------- diff --git a/examples/plugins/v8-optimize-next-call.js.log b/examples/plugins/v8-optimize-next-call.js.log index 3427174..5170f29 100644 --- a/examples/plugins/v8-optimize-next-call.js.log +++ b/examples/plugins/v8-optimize-next-call.js.log @@ -1,9 +1,9 @@ -new Uint32Array(1024) x 2,972,791 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(334.27ns ... 339.62ns) p75=337.85ns p99=339.62ns -[Managed] new Uint32Array(1024) x 2,908,439 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(332.80ns ... 358.40ns) p75=348.46ns p99=358.40ns +new Uint32Array(1024) x 2,812,339 ops/sec (13 runs sampled) v8-optimize-next-call=enabled min..max=(314.34ns ... 373.62ns) p75=359.22ns p99=373.62ns +[Managed] new Uint32Array(1024) x 2,763,965 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(348.80ns ... 381.77ns) p75=373.99ns p99=381.77ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,982,540 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(332.85ns ... 336.37ns) p75=335.21ns p99=336.37ns -[Managed] new Uint32Array(1024) x 2,919,974 ops/sec (9 runs sampled) v8-optimize-next-call=enabled min..max=(335.30ns ... 346.51ns) p75=343.26ns p99=346.51ns +new Uint32Array(1024) x 2,827,020 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(298.24ns ... 365.66ns) p75=354.33ns p99=365.66ns +[Managed] new Uint32Array(1024) x 2,775,090 ops/sec (12 runs sampled) v8-optimize-next-call=enabled min..max=(349.78ns ... 378.17ns) p75=360.17ns p99=378.17ns ---------------------------------------------------------------------------- -new Uint32Array(1024) x 2,960,287 ops/sec (11 runs sampled) v8-optimize-next-call=enabled min..max=(333.25ns ... 341.07ns) p75=339.38ns p99=341.07ns -[Managed] new Uint32Array(1024) x 2,892,614 ops/sec (8 runs sampled) v8-optimize-next-call=enabled min..max=(342.87ns ... 347.34ns) p75=344.64ns p99=347.34ns +new Uint32Array(1024) x 2,793,090 ops/sec (9 runs sampled) v8-optimize-next-call=enabled min..max=(342.17ns ... 352.58ns) p75=350.66ns p99=352.58ns +[Managed] new Uint32Array(1024) x 2,751,982 ops/sec (10 runs sampled) v8-optimize-next-call=enabled min..max=(352.72ns ... 385.30ns) p75=367.30ns p99=385.30ns ---------------------------------------------------------------------------- diff --git a/examples/string-replace/node.js.log b/examples/string-replace/node.js.log index c1e70a3..f5dbd16 100644 --- a/examples/string-replace/node.js.log +++ b/examples/string-replace/node.js.log @@ -1,15 +1,15 @@ -single with matcher x 756,264 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.32us) p75=1.32us p99=1.32us -multiple replaces x 640,863 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.58us) p75=1.57us p99=1.58us -[Managed] single with matcher x 772,463 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.30us) p75=1.30us p99=1.30us -[Managed] multiple replaces x 643,205 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.58us) p75=1.56us p99=1.58us +single with matcher x 752,020 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.34us) p75=1.33us p99=1.34us +multiple replaces x 642,602 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.55us) p75=1.55us p99=1.55us +[Managed] single with matcher x 774,049 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.28us ... 1.30us) p75=1.29us p99=1.30us +[Managed] multiple replaces x 645,958 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.58us) p75=1.55us p99=1.58us ---------------------------------------------------------------------------- -single with matcher x 762,839 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.31us) p75=1.31us p99=1.31us -multiple replaces x 641,355 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.57us) p75=1.57us p99=1.57us -[Managed] single with matcher x 776,942 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.28us ... 1.29us) p75=1.29us p99=1.29us -[Managed] multiple replaces x 642,766 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.57us) p75=1.56us p99=1.57us +single with matcher x 748,221 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.33us ... 1.35us) p75=1.35us p99=1.35us +multiple replaces x 639,390 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.57us) p75=1.56us p99=1.57us +[Managed] single with matcher x 765,396 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(1.30us ... 1.32us) p75=1.31us p99=1.32us +[Managed] multiple replaces x 644,492 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.55us) p75=1.55us p99=1.55us ---------------------------------------------------------------------------- -single with matcher x 759,956 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(1.31us ... 1.32us) p75=1.32us p99=1.32us -multiple replaces x 640,300 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.55us ... 1.56us) p75=1.56us p99=1.56us -[Managed] single with matcher x 770,091 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.30us ... 1.30us) p75=1.30us p99=1.30us -[Managed] multiple replaces x 642,915 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.57us) p75=1.56us p99=1.57us +single with matcher x 742,699 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(1.32us ... 1.34us) p75=1.33us p99=1.34us +multiple replaces x 640,209 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.57us) p75=1.56us p99=1.57us +[Managed] single with matcher x 774,824 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.29us ... 1.30us) p75=1.29us p99=1.30us +[Managed] multiple replaces x 642,062 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(1.54us ... 1.60us) p75=1.57us p99=1.60us ---------------------------------------------------------------------------- diff --git a/examples/string-searching/node.js.log b/examples/string-searching/node.js.log index 10b0b3d..c550b50 100644 --- a/examples/string-searching/node.js.log +++ b/examples/string-searching/node.js.log @@ -1,21 +1,21 @@ -Using includes x 129,501,075 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.69ns ... 7.82ns) p75=7.76ns p99=7.82ns -Using indexof x 128,393,723 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.76ns ... 7.81ns) p75=7.79ns p99=7.81ns -Using cached RegExp.test x 19,845,442 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(50.24ns ... 50.55ns) p75=50.37ns p99=50.55ns -[Managed] Using includes x 2,265,019,076 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,262,167,620 ops/sec (16 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,798,994 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.13ns ... 40.38ns) p75=40.36ns p99=40.38ns +Using includes x 131,465,887 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.53ns ... 7.61ns) p75=7.59ns p99=7.61ns +Using indexof x 130,628,503 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.62ns ... 7.67ns) p75=7.65ns p99=7.67ns +Using cached RegExp.test x 19,855,444 ops/sec (9 runs sampled) v8-never-optimize=true min..max=(50.32ns ... 50.38ns) p75=50.37ns p99=50.38ns +[Managed] Using includes x 2,259,413,999 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,262,452,858 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,771,962 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.11ns ... 40.43ns) p75=40.37ns p99=40.43ns ---------------------------------------------------------------------------- -Using includes x 130,419,486 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.63ns ... 7.74ns) p75=7.70ns p99=7.74ns -Using indexof x 131,332,101 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.63ns) p75=7.62ns p99=7.63ns -Using cached RegExp.test x 19,832,966 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(50.23ns ... 50.84ns) p75=50.45ns p99=50.84ns -[Managed] Using includes x 2,266,276,771 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,263,402,611 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,835,619 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.18ns ... 40.45ns) p75=40.37ns p99=40.45ns +Using includes x 131,872,369 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(7.53ns ... 7.70ns) p75=7.63ns p99=7.70ns +Using indexof x 131,276,601 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.56ns ... 7.67ns) p75=7.59ns p99=7.67ns +Using cached RegExp.test x 19,684,556 ops/sec (12 runs sampled) v8-never-optimize=true min..max=(50.51ns ... 51.39ns) p75=50.75ns p99=51.39ns +[Managed] Using includes x 2,279,136,862 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,259,877,221 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 24,313,713 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.92ns ... 41.19ns) p75=41.19ns p99=41.19ns ---------------------------------------------------------------------------- -Using includes x 131,655,088 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.56ns ... 7.68ns) p75=7.63ns p99=7.68ns -Using indexof x 131,260,171 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.60ns ... 7.63ns) p75=7.62ns p99=7.63ns -Using cached RegExp.test x 19,899,089 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(50.11ns ... 50.62ns) p75=50.40ns p99=50.62ns -[Managed] Using includes x 2,292,024,817 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using indexof x 2,320,347,063 ops/sec (18 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns -[Managed] Using cached RegExp.test x 24,799,003 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(40.27ns ... 40.39ns) p75=40.36ns p99=40.39ns +Using includes x 132,464,212 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(7.52ns ... 7.56ns) p75=7.56ns p99=7.56ns +Using indexof x 132,177,669 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(7.52ns ... 7.67ns) p75=7.60ns p99=7.67ns +Using cached RegExp.test x 19,854,899 ops/sec (8 runs sampled) v8-never-optimize=true min..max=(50.28ns ... 50.36ns) p75=50.32ns p99=50.36ns +[Managed] Using includes x 2,259,179,846 ops/sec (17 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using indexof x 2,181,069,609 ops/sec (11 runs sampled) v8-never-optimize=true min..max=(0.50ns ... 0.50ns) p75=0.50ns p99=0.50ns +[Managed] Using cached RegExp.test x 23,308,043 ops/sec (10 runs sampled) v8-never-optimize=true min..max=(40.23ns ... 41.24ns) p75=40.69ns p99=41.24ns ---------------------------------------------------------------------------- From c56764b05a877c990c6932339377d96f98f79e5a Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Mon, 14 Oct 2024 21:47:15 -0300 Subject: [PATCH 5/6] test: add test case for copy function Refs: https://github.com/RafaelGSS/bench-node/issues/12 --- test/env.js | 32 ++++++++++++++++++++++++++++++++ test/fixtures/copy.js | 19 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 test/env.js create mode 100644 test/fixtures/copy.js diff --git a/test/env.js b/test/env.js new file mode 100644 index 0000000..ac0d248 --- /dev/null +++ b/test/env.js @@ -0,0 +1,32 @@ +const { describe, it, before } = require('node:test'); +const assert = require('node:assert'); +const copyBench = require('./fixtures/copy'); + +describe('Same benchmark function', () => { + let results; + + before(async () => { + results = await copyBench.run(); + }); + + it('must have a similar benchmark result', () => { + for (let i = 0; i < results.length; i++) { + for (let j = 0; j < results.length; j++) { + if (i !== j) { + const opsSec1 = results[i].opsSec; + const opsSec2 = results[j].opsSec; + + // Calculate the percentage difference + const difference = Math.abs(opsSec1 - opsSec2); + const percentageDifference = (difference / Math.min(opsSec1, opsSec2)) * 100; + + // Check if the percentage difference is less than or equal to 10% + assert.ok( + percentageDifference <= 10, + `${opsSec1} too different from ${opsSec2} - ${results[i].name}` + ); + } + } + } + }); +}); diff --git a/test/fixtures/copy.js b/test/fixtures/copy.js new file mode 100644 index 0000000..91ee516 --- /dev/null +++ b/test/fixtures/copy.js @@ -0,0 +1,19 @@ +const { Suite } = require('../../lib'); + +const suite = new Suite({ reporter: false }); + +suite + .add('Using includes', function () { + const text = 'text/html,application/xhtml+xml,application/xml;application/json;q=0.9,image/avif,image/webp,*/*;q=0.8' + const r = text.includes('application/json') + }) + .add('Using includes 2', function () { + const text = 'text/html,application/xhtml+xml,application/xml;application/json;q=0.9,image/avif,image/webp,*/*;q=0.8' + const r = text.includes('application/json') + }) + .add('Using includes 3', function () { + const text = 'text/html,application/xhtml+xml,application/xml;application/json;q=0.9,image/avif,image/webp,*/*;q=0.8' + const r = text.includes('application/json') + }) + +module.exports = suite; From a641ced8b2e6f6babdca0d75c49a9f6c23f44ea2 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Tue, 15 Oct 2024 01:26:07 -0300 Subject: [PATCH 6/6] test: increase percentage diff on CI --- .github/workflows/test.yml | 3 +++ test/env.js | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29638d6..f13ab19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,9 @@ jobs: matrix: node-version: [18, 20, 22] + env: + CI: true + steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/test/env.js b/test/env.js index ac0d248..8361379 100644 --- a/test/env.js +++ b/test/env.js @@ -21,10 +21,19 @@ describe('Same benchmark function', () => { const percentageDifference = (difference / Math.min(opsSec1, opsSec2)) * 100; // Check if the percentage difference is less than or equal to 10% - assert.ok( - percentageDifference <= 10, - `${opsSec1} too different from ${opsSec2} - ${results[i].name}` - ); + if (process.env.CI) { + // CI runs in a shared-env so the percentage of difference + // must be greather there due to high variance of hardware + assert.ok( + percentageDifference <= 30, + `${opsSec1} too different from ${opsSec2} - ${results[i].name}` + ); + } else { + assert.ok( + percentageDifference <= 10, + `${opsSec1} too different from ${opsSec2} - ${results[i].name}` + ); + } } } }