Commit 0af2cb0
perf: use const reference in ConjugateGraph::Serialize loop to avoid unnecessary copies
Replace value copy with const reference for both the map entry and
the dereferenced UnorderedSet in the Serialize loop. This eliminates
N atomic shared_ptr increments and N full UnorderedSet copies when
serializing a conjugate graph with N nodes.
Signed-off-by: tianlan.lht <tianlan.lht@antgroup.com>
Co-authored-by: opencode <opencode@anthropic.com>
Signed-off-by: LHT129 <tianlan.lht@antgroup.com>1 parent 3b19c17 commit 0af2cb0
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments