messense / jieba-rs

The Jieba Chinese Word Segmentation Implemented in Rust
MIT License
738 stars 46 forks source link

Move the allocation of DAG and Route to the outside of loop #40

Closed MnO2 closed 5 years ago

MnO2 commented 5 years ago
jieba cut no hmm        time:   [6.8788 us 6.8973 us 6.9167 us]
                        change: [-42.478% -41.563% -40.844%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
  5 (5.00%) high severe

jieba cut with hmm      time:   [9.1573 us 9.1825 us 9.2130 us]
                        change: [-49.099% -47.693% -46.444%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
  9 (9.00%) high severe
➜  jieba-rs git:(optimization) ./target/release/weicheng
4182ms