yds12 / mexe

Simple and fast arithmetic expression parser
MIT License
8 stars 0 forks source link

Do profiling #3

Closed yds12 closed 2 years ago

yds12 commented 2 years ago

Use perf or flamegraph or any other profiling methods such as the ones here to find what needs optimisation.

yds12 commented 2 years ago

Command used:

$ CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -- "((1 + 2 * (6.5 - 1)) * 3.5 / 4.554) + (6 * 7.5666)"

Lexer takes 79% of the time, where 34% of the total time is spent in str::parse.

Parser takes only 21% of the time.

flamegraph-23-tokens