Skip to content
Myr

add crypto.randomUUID() to benchmarks (#305)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* add crypto.randomUUID() to benchmarks * set disableEntropyCache by true

authored by Eugene · committed by GitHub · parent 61b6fe8 · Browse files · 4 files+8 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+8 added−1 removed

  • tests:+4 added−0 removed
  • other:+4 added−1 removed

4 files+8 added−1 removed

modified:test/benchmark.js+4 added
modified:README.md+1 added
83 unmodified lines
84$ node ./test/benchmark.js85nanoid 4,975,393 ops/sec86customAlphabet 2,717,877 ops/sec87uuid v4 1,778,339 ops/sec88crypto.randomUUID() ???,??? ops/sec89uid.sync 391,311 ops/sec90secure-random-string 372,537 ops/sec91cuid 201,645 ops/sec92shortid 50,462 ops/sec
430 unmodified lines
modified:README.ru.md+1 added
89 unmodified lines
90$ node ./test/benchmark.js91nanoid 4,975,393 ops/sec92customAlphabet 2,717,877 ops/sec93uuid v4 1,778,339 ops/sec94crypto.randomUUID() ???,??? ops/sec95uid.sync 391,311 ops/sec96secure-random-string 372,537 ops/sec97cuid 201,645 ops/sec98shortid 50,462 ops/sec
416 unmodified lines
modified:README.zh-CN.md+2 added-1 removed
83 unmodified lines
84$ node ./test/benchmark.js85nanoid 2,280,683 ops/sec86customAlphabet 1,851,117 ops/sec87uuid v4 1,348,425 ops/sec88crypto.randomUUID() ???,??? ops/sec89uid.sync 313,306 ops/sec90secure-random-string 294,161 ops/sec91cuid 158,988 ops/sec92shortid 37,222 ops/sec
414 unmodified lines
507508[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary509[ID size 计算器]: https://zelark.github.io/nano-id-cc/510[`自定义字母`]: #自定义字母或大小510[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good511[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good