-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract test fixtures into WKT files #703
Conversation
577278e
to
ba68d10
Compare
ba68d10
to
3bfb2d4
Compare
|
||
bencher.iter(|| { | ||
criterion::black_box(criterion::black_box(&polygon).extremes()); | ||
}); | ||
}); | ||
|
||
c.bench_function("extremes f64", |bencher| { | ||
let points = include!("../src/algorithm/test_fixtures/norway_main.rs"); | ||
let polygon = Polygon::new(LineString::<f32>::from(points), vec![]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong type here ^
@@ -39,8 +35,7 @@ fn criterion_benchmark(c: &mut Criterion) { | |||
}); | |||
|
|||
c.bench_function("simplify vwp f64", |bencher| { | |||
let points = include!("../src/algorithm/test_fixtures/louisiana.rs"); | |||
let ls: LineString<f32> = points.into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong type here, too ^
.map(|e| Coordinate { x: e.0, y: e.1 }) | ||
.collect(); | ||
let res = quick_hull(&mut v); | ||
assert!(res.is_strictly_ccw_convex()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poly2_hull
wasn't used
r? @urschrei |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And me! |
bors r+ |
Build succeeded: |
CHANGES.md
if knowledge of this change could be valuable to users.Fixes #566
Some notes:
#[cfg(bench)]
); it haspublish = false
to prevent accidental publishingextremes f64
andsimplify vwp f64
benches were testing anf32
implementationrust-analyzer
used to balk on the largerinclude!
s, it feels much better now