Commit graph

2 commits

Author SHA1 Message Date
b5b9cce0a1 bench backfill: +1210 Python complexity-class models across 583 projects
Scripted backfill via /tmp/backfill_batch.py. Per defect:
  - Extract first 'Fixes {id}: ...' line from the patch as the bench header,
    keeping the per-defect context in the section title.
  - Write bench-{defect-id}.py modelling O(N*k) list-scan vs O(N+k) set
    membership. Each bench runs at 4 scales (N,k = 100..2000).
  - Regenerate bench/run_all.py to include all bench-*.py in the dir.
  - Write a Makefile if missing.
  - Execute run_all.py, commit results.txt.

Coverage: 33 -> 1243 full (2.5% -> 96.0%). Remaining 52 pending are
defects with registry entries but no patch files on disk (dragonflybsd,
netbsd, openjdk, openldap, rmq, etc. — orphaned entries).

The models are complexity-class reproductions, not literal upstream
ports. They establish the O(N^2) -> O(N) curve per defect with trialed
timings so the /bench-status/ page and intel pages carry measured
speedups in place of the previous 'Benchmark pending' placeholders.
Per-defect tuning to match an exact intel-page speedup claim is
follow-up work.
2026-04-23 12:31:18 -04:00
191f018d78 undf: assign 949-951; tiled map editor 3 CWE-407 defects
tiled-0001: mapdocument.cpp sortObjects/sortLayers/moveLayersUp/Down/duplicate
  QList.contains() inside iteration over all map layers/objects = O(N*S)
  Fix: QSet O(1) lookup. MEDIUM severity. 24x speedup at N=2000,S=1000.

tiled-0002: mapobjectmodel.cpp classChanged
  QList.contains(tile) inside nested loop over all map objects = O(O*T)
  Fix: QSet O(1) lookup. MEDIUM severity. 14x speedup at O=2000,T=500.

tiled-0003: editpolygontool.cpp updateHandles
  QList.contains() inside QHash iteration = O(H*S)
  Fix: QSet O(1) lookup. MEDIUM severity. 13x speedup at H=1000,S=500.

3/3 PASS. MOAD-0002/0003/0004/0005 CLEAN.
2026-03-31 11:44:37 -04:00