Skip to content

Commit

Permalink
chore: use new trait in benches
Browse files Browse the repository at this point in the history
  • Loading branch information
grevgeny committed Nov 22, 2024
1 parent 5ee4746 commit ffabef8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions geo/benches/frechet_distance.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::{criterion_group, criterion_main};
use geo::frechet_distance::FrechetDistance;
use geo::{line_measures::FrechetDistance, Euclidean};

fn criterion_benchmark(c: &mut criterion::Criterion) {
c.bench_function("frechet distance f32", |bencher| {
Expand All @@ -8,7 +8,8 @@ fn criterion_benchmark(c: &mut criterion::Criterion) {

bencher.iter(|| {
criterion::black_box(
criterion::black_box(&ls_a).frechet_distance(criterion::black_box(&ls_b)),
criterion::black_box(&ls_a)
.frechet_distance::<Euclidean>(criterion::black_box(&ls_b)),
);
});
});
Expand All @@ -19,7 +20,8 @@ fn criterion_benchmark(c: &mut criterion::Criterion) {

bencher.iter(|| {
criterion::black_box(
criterion::black_box(&ls_a).frechet_distance(criterion::black_box(&ls_b)),
criterion::black_box(&ls_a)
.frechet_distance::<Euclidean>(criterion::black_box(&ls_b)),
);
});
});
Expand Down

0 comments on commit ffabef8

Please sign in to comment.