CodeVetter
← All optimization trials
confirmed Local evidence

Free AI

A one-pass model-selection loop removed an intermediate array and improved every tested registry size without growing the patch.

Availability: Uses the current local Vitest performance path.

Largest tested registry

29.8% faster

0.016568 → 0.011624 ms/op at 79 models

Sampled source bytes

30.1% lower

source and total agree

Peak process-tree RSS

0.0% lower

not material; no regression

Tested boundary

Flow
test/select-model-performance.spec.ts — model selection scales across the supported registry size
Source
src/router/select-model.ts:171
Revision
23ed8566bb1b1d8d86ee1f9890aa4ad5bba9cd18

Decision path

  1. observed Allocation hotspot in selectCandidates84.1% of initial sampled allocation bytes pointed at the source.
  2. tested Build the ranked list directly10 interleaved samples per side covered three registry sizes.
  3. confirmed Faster with less codeThe candidate removed seven net lines, added no dependency, and passed the bounded change-cost policy.

Patch cost

1 file · +19 / -26 · 45 gross · net -7 · 0 dependencies

Correctness: 241 tests in 37 files passed, plus typecheck and changed-file lint.

What this does not prove

Browse all trials Open proof JSON →