Skip to content

Commit

Permalink
Use smaller polygon for simplify benchmarks.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed May 9, 2020
1 parent 9f03744 commit f6972a1
Show file tree
Hide file tree
Showing 2 changed files with 5,413 additions and 3 deletions.
14 changes: 11 additions & 3 deletions geo/benches/simplify.rs
Expand Up @@ -9,23 +9,31 @@ use geo::LineString;

fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("simplify vw simple f32", |bencher| {
let points = include!("../src/algorithm/test_fixtures/norway_main.rs");
let points = include!("../src/algorithm/test_fixtures/louisiana.rs");
let ls: LineString<f32> = points.into();
bencher.iter(|| {
let _ = ls.simplifyvw(&0.0005);
});
});

c.bench_function("simplify vw simple f64", |bencher| {
let points = include!("../src/algorithm/test_fixtures/norway_main.rs");
let points = include!("../src/algorithm/test_fixtures/louisiana.rs");
let ls: LineString<f64> = points.into();
bencher.iter(|| {
let _ = ls.simplifyvw(&0.0005);
});
});

c.bench_function("simplify vwp f32", |bencher| {
let points = include!("../src/algorithm/test_fixtures/norway_main.rs");
let points = include!("../src/algorithm/test_fixtures/louisiana.rs");
let ls: LineString<f32> = points.into();
bencher.iter(|| {
let _ = ls.simplifyvw_preserve(&0.0005);
});
});

c.bench_function("simplify vwp f64", |bencher| {
let points = include!("../src/algorithm/test_fixtures/louisiana.rs");
let ls: LineString<f32> = points.into();
bencher.iter(|| {
let _ = ls.simplifyvw_preserve(&0.0005);
Expand Down

0 comments on commit f6972a1

Please sign in to comment.