Repository navigation
Use small-vector dedup in box scanners - #2456
Merged
klayoutmatthias merged 2 commits intoOct 2, 2026
Merged
Conversation
Co-Authored-By: GLM 5.3 <noreply@z.ai>
- replace the std::set of seen pairs with a per-object inline array of up to 4 partners, promoted to a hash set only for high-degree objects; entries are dropped at the same band-exit points as before - drop seen2 in box_scanner2, which was never queried - reported pairs and callback order are unchanged Compared with the old set and with the dedup from PR 2377 (one process per case for peak RSS): | case | std::set ms | PR 2377 ms | this ms | std::set MB | PR 2377 MB | this MB | |---|---:|---:|---:|---:|---:|---:| | sparse/200000 | 40.9 | 37.1 | 36.0 | 29.5 | 29.3 | 29.1 | | lonely_pairs/200000 | 66.0 | 53.4 | 30.4 | 47.5 | 80.8 | 53.5 | | medium/200000 | 202 | 105 | 85.6 | 29.6 | 29.7 | 29.4 | | dense/50000 | 389 | 154 | 145 | 27.0 | 26.0 | 26.0 | | very_dense/5000 | 225 | 90.3 | 93.2 | 33.6 | 30.0 | 30.0 | | box_scanner2_dense/30000 | 743 | 385 | 200 | 34.0 | 32.0 | 29.7 | On the vexriscv LVS flow at 1 thread, the combined fix branches (this plus the connectivity and cache fixes, which are serial-neutral) run 26.7 s against 29.0 s on parallelize-rebased. Measured on a 2x AMD EPYC 7713 (128 cores) Linux machine, g++ 13 -O2 with OpenMP and TBB, median of 5 repetitions x 2 interleaved passes. Co-Authored-By: GLM 5.3 <noreply@z.ai> Co-Authored-By: DeepSeek V4.1 Flash <noreply@deepseek.com>
nikosavola
marked this pull request as ready for review
September 29, 2026 10:19
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.
std::setof seen pairs inbox_scannerandbox_scanner2with a per-object inline array of up to 4 partners, promoted to a hash set only for high-degree objects; entries are dropped at the same band-exit points as beforeseen2inbox_scanner2, which was never queriedstd::set<pair>#2377 that keeps its speed on dense scans without the extra memory for lonely pairs raised in that reviewPeak RSS is per process, one case per process (about 24 MB is the benchmark binary). Pair counts are identical for all three.
The benchmark uses the Google Benchmark suite from
parallelize-rebasedon my fork, which is not part of this PR. Numbers: 2x AMD EPYC 7713 (128 cores), g++ 13 -O2, OpenMP, median of 5 repetitions x 2 interleaved passes.Benchmark code
This PR was carried out with AI assistance (open-weight GLM 5.3 and DeepSeek V4.1 Flash) and reviewed before submission.