Skip to content

test: improve performance of test-crypto-timing-safe-equal-benchmarks

Resetting require.cache() to Object.create(null) each time rather than deleting the specific key results in a 10x improvement in running time.

Fixes: https://github.com/nodejs/node/issues/25984 Refs: https://github.com/nodejs/node/issues/26229

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading