-
Notifications
You must be signed in to change notification settings - Fork 1
perf: improve Hilbert curve correctness and add bulk API (#207) #216
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
Changes from all commits
18546d7
fbd5977
48ced3e
fb12992
28f691b
2896830
d68d111
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # nextest configuration for delaunay | ||
| # See: https://nexte.st/book/configuration.html | ||
|
|
||
| [profile.default] | ||
| # Run tests in parallel by default | ||
| test-threads = "num-cpus" | ||
|
|
||
| # Show test output for failures | ||
| failure-output = "immediate-final" | ||
| success-output = "never" | ||
|
|
||
| # Continue running tests after first failure | ||
| fail-fast = false | ||
|
|
||
| # Retry flaky tests (useful for proptests) | ||
| retries = 0 | ||
|
|
||
| [profile.ci] | ||
| # CI profile: optimized for GitHub Actions | ||
| # Inherits from default profile | ||
|
|
||
| # Show more verbose output in CI | ||
| failure-output = "immediate-final" | ||
| success-output = "never" | ||
|
|
||
| # Continue running all tests even if some fail | ||
| fail-fast = false | ||
|
|
||
| # Retry flaky tests once in CI (helps with proptests and timing-sensitive tests) | ||
| retries = 1 | ||
|
|
||
| # Show slow tests (> 60s) in CI | ||
| slow-timeout = { period = "60s", terminate-after = 2 } | ||
|
|
||
| # JUnit report configuration | ||
| [profile.ci.junit] | ||
| # Store reports in test-results directory (matches workflow) | ||
| path = "test-results/junit.xml" | ||
|
|
||
| # Store test output in JUnit report | ||
| store-success-output = false | ||
| store-failure-output = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1226,7 +1226,11 @@ where | |
| .into_iter() | ||
| .enumerate() | ||
| .map(|(input_index, vertex)| { | ||
| let idx = hilbert_index(vertex.point().coords(), bounds, bits_per_coord); | ||
| let idx = hilbert_index(vertex.point().coords(), bounds, bits_per_coord) | ||
| .unwrap_or_else(|_| { | ||
| // On error, fall back to lexicographic ordering based on input index | ||
| <u128 as From<u32>>::from(u32::try_from(input_index).unwrap_or(u32::MAX)) | ||
| }); | ||
|
Comment on lines
+1229
to
+1233
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fallback path is input-order, not lexicographic. At Line 1232, the fallback key is derived from 💡 Proposed fix- let idx = hilbert_index(vertex.point().coords(), bounds, bits_per_coord)
- .unwrap_or_else(|_| {
- // On error, fall back to lexicographic ordering based on input index
- <u128 as From<u32>>::from(u32::try_from(input_index).unwrap_or(u32::MAX))
- });
+ let idx = hilbert_index(vertex.point().coords(), bounds, bits_per_coord)
+ .unwrap_or_else(|_| {
+ // On error, force fallback ordering to rely on the existing
+ // lexicographic + input-index tie-breakers in `sort_by`.
+ u128::MAX
+ });🤖 Prompt for AI Agents |
||
| (idx, vertex, input_index) | ||
| }) | ||
| .collect(); | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 108
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 2098
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 4372
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 697
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 517
🏁 Script executed:
Repository: acgetchell/delaunay
Length of output: 2149
Run
just spell-checkafter editing this documentation.Please run the spell-check command for this added section and add any legitimate technical terms to
typos.tomlif flagged, as per the documentation guidelines.🤖 Prompt for AI Agents