fluent-rs
fluent-rs copied to clipboard
Use `memchr` to optimize `get_text_slice`
Running the benchmarks on my machine, I get these results:
parse_ctx_runtime/browser
time: [106.61 µs 106.73 µs 106.85 µs]
change: [-17.886% -17.720% -17.552%] (p = 0.00 < 0.05)
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
8 (8.00%) high mild
1 (1.00%) high severe
parse_ctx_runtime/preferences
time: [277.45 µs 277.83 µs 278.29 µs]
change: [-8.5355% -8.3601% -8.1949%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
5 (5.00%) high mild
2 (2.00%) high severe
With some stress tests against Fluent files used in rustc, I saw improvements of 20-30%.