wokket / rust-hl7

Learning rust by playing with a HL7 parser. Use for real at your own risk!
18 stars 8 forks source link

FlameGraph Analysis #39

Open sempervictus opened 3 years ago

sempervictus commented 3 years ago

While on a call about things that might eventually lead to the use of this to actually help people, i figured i might collect some performance data via cargo flamegraph --bench simple_parse --features string_index -- --bench - results are interesting. We're eating up less time than the threading libraries and benchmark suite by a good margin (expected, simple operations). Somehow you're beating me out pretty consistently on the query vs index bits :-p. Unfortunately, GH won't lemme attach the flamegraph SVG by itself, but here's a screenshot of where we are today on an i9HK (gen9): image The pink (? sorry, kinda colorblind) parts are results for the rusthl7 search within the SVG, about 1/3 of the runtime measured. Mostly filing this issue to plant a flag for baseline - now its here for posterity in case those numbers change for the worse.

wokket commented 3 years ago

Sweet, feel free to add the raw SVG inside the codebase (in a readme in benches or something?) 👍

I have difficulty running perf on my windows box to get flamegraphs (and my linux box has dust on it I use it so rarely) so this is good to see. I started looking into adding instruction counts/cache misses to the build benchmark rather than wall time to remove VM fluctuations.