nk2028 / opencc-js

The JavaScript version of Open Chinese Convert (OpenCC)
https://www.npmjs.com/package/opencc-js
MIT License
240 stars 22 forks source link

Improve performance #3

Closed ren1244 closed 4 years ago

ren1244 commented 4 years ago

我盡可能讓程式不要變動太多 但如果保留 _longestPrefix 的架構 在 chrome 測試,效能上還是會有些影響 (頻繁的 function call)

所以儘管比較不好看 我還是拿掉 _longestPrefix 而使用兩層迴圈的方式了

sgalal commented 4 years ago

謝謝!能再加入一個速度測試嗎?