@napi-rs/pinyin
rust-pinyin (opens in a new tab) binding to Node.js.
Performance
Hardware info:
Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: 6-Core Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
Running "Short input without segment" suite...
Progress: 100%
@napi-rs/pinyin:
962 035 ops/s, ±0.68% | fastest
node-pinyin:
434 241 ops/s, ±0.66% | slowest, 54.86% slower
Finished 2 cases!
Fastest: @napi-rs/pinyin
Slowest: node-pinyin
Running "Long input without segment" suite...
Progress: 100%
@napi-rs/pinyin:
59 ops/s, ±0.83% | fastest
node-pinyin:
2 ops/s, ±3.30% | slowest, 96.61% slower
Finished 2 cases!
Fastest: @napi-rs/pinyin
Slowest: node-pinyin
Running "Short input with segment" suite...
Progress: 100%
@napi-rs/pinyin:
530 228 ops/s, ±1.94% | fastest
node-pinyin:
307 788 ops/s, ±0.83% | slowest, 41.95% slower
Finished 2 cases!
Fastest: @napi-rs/pinyin
Slowest: node-pinyin
Running "Long input with segment" suite...
Progress: 100%
@napi-rs/pinyin:
152 ops/s, ±1.09% | fastest
node-pinyin:
3 ops/s, ±3.08% | slowest, 98.03% slower
Finished 2 cases!
Fastest: @napi-rs/pinyin
Slowest: node-pinyin
✨ Done in 53.36s.