use criterion::{criterion_group, criterion_main, Criterion}; use geo::simplify::Simplify; fn criterion_benchmark(c: &mut Criterion) { c.bench_function("simplify simple f32", |bencher| { let ls = geo_test_fixtures::louisiana::(); bencher.iter(|| { criterion::black_box(criterion::black_box(&ls).simplify(criterion::black_box(&0.01))); }); }); c.bench_function("simplify simple f64", |bencher| { let ls = geo_test_fixtures::louisiana::(); bencher.iter(|| { criterion::black_box(criterion::black_box(&ls).simplify(criterion::black_box(&0.01))); }); }); } criterion_group!(benches, criterion_benchmark); criterion_main!(benches);