napi-nanoid
基于 Rust 实现的 nanoid 高性能版本,性能超过 JavaScript 版本 40% 以上,提供安全和非安全两种模式。
• Copy the embed code to showcase this product on your website
• Share on X to spread the word about this amazing tool
仓库: https://github.com/rustq/napi-nanoid性能对比:`nanoid comparerust js-nanoid: 3 318 612 ops/s, ±1.10% napi-nanoid: 5 141 154 ops/s, ±0.84% js-nanoid (non-secure): 2 005 501 ops/s, ±0.15% napi-nanoid (non-secure): 5 359 638 ops/s, ±0.13%
performance of all````rustshortid 23,900 ops/seccuid 102,473 ops/secsecure-random-string 194,803 ops/secuuid 839,287 ops/secjs-nanoid (non-secure) 1,944,889 ops/secjs-nanoid (secure) 3,323,263 ops/secnapi-nanoid (secure) 4,862,067 ops/secnapi-nanoid (non-secure) 5,007,932 ops/seccrypto.randomUUID 10,658,212 ops/sechyperid 14,534,342 ops/sec```Benchmark configuration: Linux x64 gnu, Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz, Node.js 16.20.0(runs: 4905855849)rustcc 文章: https://mp.weixin.qq.com/s/I9z0_CX7kezim-s-FZlykA