This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit 100a6e1
committed
perf(PlanarGraphAnalyzer): eliminate HashSet allocation in contraction strategies 2/3
In tryContractionStrategy cases 2 and 3 (common-neighbor heuristic),
replaced per-edge HashSet copy + retainAll with an allocation-free
counting loop that iterates the smaller neighbor set and probes the
larger one. Eliminates O(|E|) temporary HashSet allocations in the
inner loop of the minor-detection contraction phase.1 parent 640aa34 commit 100a6e1
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
631 | 639 | | |
632 | | - | |
| 640 | + | |
633 | 641 | | |
634 | 642 | | |
635 | 643 | | |
| |||
0 commit comments