(paths: string[])
| 141 | } |
| 142 | |
| 143 | private resetArrays(paths: string[]): void { |
| 144 | const n = paths.length |
| 145 | this.paths = paths |
| 146 | this.lowerPaths = new Array(n) |
| 147 | this.charBits = new Int32Array(n) |
| 148 | this.pathLens = new Uint16Array(n) |
| 149 | this.readyCount = 0 |
| 150 | this.topLevelCache = computeTopLevelEntries(paths, TOP_LEVEL_CACHE_LIMIT) |
| 151 | } |
| 152 | |
| 153 | // Precompute: lowercase, a–z bitmap, length. Bitmap gives O(1) rejection |
| 154 | // of paths missing any needle letter (89% survival for broad queries like |
no test coverage detected