Skip to content

Introduction

pinyin-pro is a professional JavaScript library for converting Chinese to Pinyin, with high accuracy, lightweight size, excellent performance, and rich functionality.

Among similar products, pinyin-pro has achieved a leading position in terms of accuracy, size, performance, functional richness and so on. The following are specific comparative data on performance and accuracy with similar competitors pinyin and @napi-rs/pinyin.

Test Environment

  • Device:
    • Brand and model: Lenovo XiaoXinPro-13ARE 2020
    • System:Windows10
    • RAM:16 GB
    • CPU: AMD Ryzen 7 4800U 1.8GHz
  • Runtime Environment: Nodejs v18.12.1

Benchmark

Comparison itempinyin@napi-rs/pinyinpinyin-pro
Accuracy😕 Node 版: 94.097%😕 94.097%🤩 99.846%
😕 Web 版: 91.170%
PerformanceDictionary initialization on first use🚀 14.261ms🐢 160.769ms🚀 8.412ms
10,000 Chinese characters🚲 74.442ms🚀 4.298ms🚀 7.216ms
100,000 Chinese characters🐢 6287.332s🚀 29.32ms🚀 45.471ms
1,000,000 Chinese characters⛔ Out Of Memory🚀 297.41ms🚀 328.338ms
10,000,000 Chinese characters⛔ Out Of Memory🚀 3907.278ms🚀 3375.192ms
CompatibilityBrowser✔️ Supported❌ Not Supported✔️ Supported
Node✔️ Supported✔️ Supported✔️ Supported

Data Source

  • More details on accuracy testing data: accuracy
  • More details on performance testing data: speed