mthh / contour-rs

Contour polygon creation in Rust (using marching squares algorithm)
https://crates.io/crates/contour
Apache License 2.0
50 stars 10 forks source link

Switch benchmarks to criterion for more accurate profiling #20

Closed netthier closed 3 weeks ago

netthier commented 3 weeks ago

While profiling the changes made in https://github.com/mthh/contour-rs/pull/14 and https://github.com/SenseLabsDE/contour-rs/tree/grid I noticed that I barely got any samples. After asking in the Rust Discord, this turned out to be due to the native Rust benchmarks not running for long enough.

This PR switches the benchmarks over to criterion which amongst other features runs the benchmarks for a longer time and leads to substantially better perf data. It also comes with the bonus of not requiring a nightly compiler, unlike the current benchmarks.

mthh commented 3 weeks ago

That's great, thank you for this contribution!