perf(#313): dedupe intel export extraction with a Set (#393)

intelExtractExports deduped export names with `if (!arr.includes(x)) arr.push(x)`
across ~8 extraction loops (one doubly-nested over an export block) — O(n^2).
Accumulate into Sets (add/has/size) and materialize to an array once at return.
Set dedups by value and preserves insertion order, so the returned export list
and its first-seen order are identical. Adds behavior-lock tests for dedup + order.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-27 20:21:39 -04:00
committed by GitHub
parent d77170a25d
commit 269ed3e3b5
3 changed files with 120 additions and 16 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 313
---
Dedupe extracted exports with a Set instead of O(n^2) array.includes scans in intelExtractExports (#313).