-
Notifications
You must be signed in to change notification settings - Fork 28
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
fix: use a stable sort in sortf function #39
base: master
Are you sure you want to change the base?
Conversation
@kurtlawrence as far as I remember, the unstable sort was used intentionally because it should be faster (and sort order doesn't impact triangulation correctness). Can you see how much the change affects benchmark results? |
The issue we found is that we triangulate a grid of points. Thus, there are point that are equidistant from the seed triangles circumcenter.
I'll look into doing a benchmark |
@mourner This is the result of the benchmark on my machine.
|
@kurtlawrence so, the change looks like a 3–5% hit to performance. Do you think this would be worth the hit, or perhaps there is a workaround you could go for on your project side to keep performance intact? |
For now, we have forked the repository and made the alteration. There isn't anything we can do code wise unfortunately. |
I ran into an issue upgrading Rust 1.80 to 1.82 which broke some of our testing.
I tracked the issue down to a change in the output of triangualate, driven by not using a stable sort.
By using a stable sorting algorithm, the output of the triangulate function will be stable across Rust versions.