Codeflash / patterns#9
⚡️ Speed up function validate_regex by 9,172%
PASS
No behaviour divergence found by any probe.
Performance · validate_regex
No realistic input family measured slower.
- F2
| Family | Inputs | Ratio range | Slope base → head | Verdict |
|---|---|---|---|---|
F2 | Repeated identical regex patterns (duplicates). The cache returns the compiled‑result on the 2nd…Nth call, so total time grows only with the first compilation.claimed speedup · plan | 0.23× – 0.31× | 0.01 → 0.05 | faster |
Receipt
| Target | Backend | Image | Run | Audit | Adjudication |
|---|---|---|---|---|---|
json2haproxy:validate_regex | Token Factory Sandboxes | bcc79688-d7fb-4ce5-921c-c5f853d78731 | bt-patterns#9-728c64 | $0.031 | $0.000 |
Nemotron cost on Nebius Token Factory. Backend: where the untrusted code ran. Token Factory Sandboxes (a microVM branched from a kept image, cited by its UUID). Every image is content-addressed (repo at each commit + harness), so every card re-runs from the image and seed 0. Raw data: audit.