Skip to content

assert: improve assert()/assert.ok() performance

Rodrigo Muino Tomonari requested to merge github/fork/mscdex/perf-assert-ok into master

With included benchmark:

                            confidence improvement accuracy (*)    (**)   (***)
 assert/ok.js n=1000000000        ***    841.57 %       ±8.15% ±11.30% ±15.66%

Be aware that when doing many comparisions the risk of a false-positive
result increases. In this case there are 1 comparisions, you can thus
expect the following amount of false-positive results:
  0.05 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.01 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

CI: https://ci.nodejs.org/job/node-test-pull-request/13637/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading