Closed naomijub closed 4 years ago
@otaviopace
I will probably use parser combinators https://github.com/Geal/nom
Considering bench tool Criterion we got:
Benchmarking parse: Collecting 100 samples in estimated 5.1256 s (172k iteration
parse time: [29.361 us 29.447 us 29.541 us]
Found 7 outliers among 100 measurements (7.00%)
2 (2.00%) low mild
5 (5.00%) high severe
which can be improved to 5~7us
https://github.com/naomijub/edn-duration-benchmark/tree/master/criterion-parse-rs
Current benchmark is around 13us: https://github.com/naomijub/edn-rs/pull/40
By not using
replace
we could improve performance to somewhere around25µs
. Currently the parse performance is around140µs
: