zbraniecki / intl-measurements

Measurements of various intl approaches
4 stars 3 forks source link

Add line break benchmarks #7

Closed aethanyc closed 3 years ago

aethanyc commented 3 years ago

Add line break benchmarks for ICU4C, uax14_rs, and rust_icu.

aethanyc commented 3 years ago

Result on my machine (Intel Core i5-9600K 6-Core 3.7 GHz, 32 GB RAM):

ICU4C (Version 66 from the system)

Command:

cd icu4c/cpp; make; for number in {1..3}; do ./line_break ; done

The third result:

Testing zhuangzi-en.txt
Initialize line breaker: 40ms
Iterate line break opportunities: 1246ms
Testing zhuangzi-zh.txt
Initialize line breaker: 10ms
Iterate line break opportunities: 389ms

uax14_rs

Command:

cd rust/uax14_rs; for number in {1..3}; do cargo run --release ; done

The third result:

Initialize line breaker: 0ms
Iterate line break opportunities: 844ms
Testing zhuangzi-zh.txt
Initialize line breaker: 0ms
Iterate line break opportunities: 151ms

rust_icu

Command:

cd rust_icu/line_break; for number in {1..3}; do cargo run --release ; done

The third result:

Testing zhuangzi-en.txt
Initialize line breaker: 116ms
Iterate line break opportunities: 1195ms
Testing zhuangzi-zh.txt
Initialize line breaker: 10ms
Iterate line break opportunities: 353ms
aethanyc commented 3 years ago

Thanks for the review!