Conversation
…arallelLeidenView Replace per-visit std::unordered_map hashing with InducedSubgraphView-style flat techniques: - CoarsenedGraphView::computeNeighbors stages (supernode, weight) pairs into a thread-local buffer, sorts, and combines runs. Removes hash-table ops and per-call bucket allocations; output is deterministic. - ParallelLeidenView::parallelMove stages (community, weight) pairs once per visit, sort-combines into parallel pointers/cutVals vectors, and uses binary search for the current-community cut. Reusable per-thread buffers cut malloc/free churn; single forNeighborsOf pass halves view re-aggregation in the move phase. - ParallelLeidenView::parallelRefine uses Aux::flat_map for cutWeights (small refinement neighborhoods favor binary search over hashing).
Scope the CoarsenedGraphView aggregation buffer to the phase: reusable thread-local scratch within a move/refine phase, released (shrink_to_fit) via CoarsenedGraphView::releaseThreadScratch() at each phase boundary in ParallelLeidenView::parallelMove/parallelRefine. A giant-supernode high-water mark from one level can no longer leak into the next.
adsharma
added this pull request to stack #79
September 14, 2026 21:56
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.
Replace per-visit std::unordered_map hashing with flat sort-combine techniques (see stacked PR for eager cache follow-up).
Tests: networkit_tests eiden:oarsen:nducedSubgraph 46/46 passed.