Make Leiden faster than Louvain - #316
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
Performance
Fresh release-process measurements used 5 warmups and 51 alternating observations per algorithm on FastAPI pinned at
0c2b6aafd7a2e3a5bf1055ea0ed0a41da15ba5f4.Leiden is 1.4% faster on the max-inference graph and 5.6% faster on the low-inference graph. In the release in-process compact qualification, fixed Leiden is 0.611x Louvain latency (39% faster). Median peak RSS on the max graph is 136.13 MiB versus 134.19 MiB for Louvain, a 1.44% overhead.
The fixed-Leiden max-graph output SHA-256 remains exactly
4f26ed16c66b5f939e2436255dfff884defa431392b26a3e322c331f957a4e75; community count and quality metrics are unchanged.Verification
cargo fmt --all -- --checkcargo test -p compass-graph --lockedcargo clippy -p compass-graph --all-targets --all-features --locked -- -D warningscargo clippy --workspace --lib --bins --locked -- -D warningscargo test --workspace --lib --bins --locked./scripts/qualify_code_graph_v1.sh --fixtures-only./scripts/qualify_code_graph_v1.sh --community-quality --report /Volumes/Workspace/crabbuild-target/compass-c112/community-quality-optimized.jsonsh scripts/check_product_boundary.shgit diff --checkThe generated community-quality report is byte-identical to the checked-in qualification artifact.