shnewto / bnf

Parse BNF grammar definitions
MIT License
256 stars 22 forks source link

Benchmark BNF examples via Criterion #91

Closed CrockAgile closed 2 years ago

CrockAgile commented 2 years ago

Changes

I hope the README explains this PR. But one additional nice thing to look at is a screenshot from the Criterion report 😍

image

Obviously big caveat to the numbers. Running on my personal laptop, with other process activity, etc. But nice to see what the reports can look like!

Issues

One potential issue with these benchmarks is that Grammar::generate relies on random seeds. Currently there is no public API for generating with a static, controlled seed for reliable benchmarking. This introduces some chance to that benchmark, but hopefully it is small noise in the big picture. On my machine, I observed ~2% of performance drift between random Grammar::generate benchmarks.

shnewto commented 2 years ago

this is rad, really glad to see it incorporated, totally agree with 😍

codecov[bot] commented 2 years ago

Codecov Report

Merging #91 (3dd3171) into main (ae2f27c) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #91   +/-   ##
=======================================
  Coverage   91.94%   91.94%           
=======================================
  Files          10       10           
  Lines         869      869           
=======================================
  Hits          799      799           
  Misses         70       70           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update ae2f27c...3dd3171. Read the comment docs.