Repository navigation
Optimize ward - #533
Merged
Merged
Optimize ward#533
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmarks — 4 blobs, d=4, k=4, seed 42, best-of-3 after warm-up, same protocol for both implementations (old pulled from
git show HEAD):Scaling per doubling improves from ~5.8× (old) to ~4.6×, and the trend keeps widening with n — the old cost's super-exponential shape from heap bloat is gone. At small n the C-implemented
SplMinHeapstill competes, hence parity at 500.I also considered an active-cluster list to skip the per-epoch scan of retired clusters; measured the savings (~8M cheap comparisons ≈ 10 ms at n=4000 out of 18 s) aren't worth the added bookkeeping, so I left it out.