Commit f00f4a4
⚡ [perf] optimize nested array lookup in version table (#24)
- Convert `selected` array to a `Set` before the loop in `removeSelectedVersions`.
- Improves lookup complexity from O(N) to O(1) per iteration.
- Measured ~6x performance improvement for large datasets in benchmarks.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com>1 parent 693dffd commit f00f4a4
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
0 commit comments