use criterion::{criterion_group, criterion_main, Criterion}; use geo::prelude::*; use geo::Polygon; fn criterion_benchmark(c: &mut Criterion) { c.bench_function("extremes f32", |bencher| { let norway = geo_test_fixtures::norway_main::(); let polygon = Polygon::new(norway, vec![]); bencher.iter(|| { criterion::black_box(criterion::black_box(&polygon).extremes()); }); }); c.bench_function("extremes f64", |bencher| { let norway = geo_test_fixtures::norway_main::(); let polygon = Polygon::new(norway, vec![]); bencher.iter(|| { criterion::black_box(criterion::black_box(&polygon).extremes()); }); }); } criterion_group!(benches, criterion_benchmark); criterion_main!(benches);