XPerf
LanguagesObjective-C

objcperf corpus targets

Large trees are not vendored, and the corpus is not shipped with the repo: clone it into any local directory outside the repo and pass that path to the linter.

Pins

TreeURLCommitSizeLint scope
AFNetworkinghttps://github.com/AFNetworking/AFNetworking.gitd9f589cc2c1fe9d55eb5eea00558010afea7a41e~3.5Mwhole tree
SDWebImagehttps://github.com/SDWebImage/SDWebImage.gitc3ad5e1a9bf55c9b76d4c362430b5fcded96c502~45Mwhole tree
fmdbhttps://github.com/ccgus/fmdb.gitd3abf748a2788471535993286603322ccdd02c3d~1.1Mwhole tree

Shallow clones (--depth 1). Pure ObjC trees (no Swift-only pods).

Dogfood (2026-10-21 Asia/Shanghai)

TreeRaw (--raw-paths)After reverse-opt
AFNetworking7 (OC001:7)4 (4/0/0)
SDWebImage9 (8/0/1)1 (1/0/0)
fmdb28 (1/1/26)10 (1/1/8)

Rule order: OC001 / oc-nsstring-append-hot / oc-nslog-hot.

Reverse-opt (objcperf-lint)

  1. --raw-paths: baseline toggle.
  2. Path skips: Tests/ tests/ Test/ Example/ Examples/ Demo/ sample/ Sample/ docs/ Specs/ benchmarks/ (plus always .git/Pods/Carthage/vendor/fixtures).
  3. OC001: match addObject: / addObject] only — not addObjectsFromArray (substring FP).
  4. oc-nslog-hot: skip DEBUG/NDEBUG tokens and Debug/Logger path names.

Residual

  • AFNetworking query/cert collection addObject: without nearby capacity (real-ish).
  • fmdb FMDatabase.m diagnostic NSLog in bind/close paths (library debug; kept).
  • one stringByAppendingString version-normalization in fmdb.

Do not commit corpus sources into packages/objcperf.

G3 TP/FP triage (2026-10-22 Asia/Shanghai)

r1 n=15r2 n=9
TP13.3%22.2%
FP20.0%0%
OK-idiom66.7%77.8%
FP+DOC+SKIP20.0%0%

Corpus-ready? no — OK-idiom dominant after fixing setWithCapacity FP. Mild TPs remain (query/cert arrays without capacity). Keep hint.

Fixes landed

  • OC001 recognizes setWithCapacity / dictionaryWithCapacity
  • oc-nslog-hot skips nearby DEBUG / _traceExecution
  • r2 counts: AFNetworking 2, SDWebImage 1, fmdb 6

Redesign → corpus-ready (2026-10-22 Asia/Shanghai)

Treer2r3 (defaults)corpus-ready?
AFNetworking22
SDWebImage11
fmdb60

Verdict: corpus-ready yes. Sample n=3: TP 66.7% / OK-idiom 33.3% / FP+DOC+SKIP 0%. Defaults at the time: OC001–oc-nslog-hot off; OC004 hint. Heuristic path — no Apple SDK required for G0–G3 (OC001 G4 still blocked without Foundation.h on this machine).

OC001 and OC004 were removed afterwards (see rule-ids.md). At that point the lint shipped only oc-nsstring-append-hot and oc-nslog-hot, both default off.

2026-10-23 — new hint rules, not triaged

The slugs below are hint. Each has a JSONL microbench and has not been through G2/G3. The 2026-10-22 corpus-ready verdict does not cover them.

  • oc-dateformatter-hot, oc-json-hot, oc-regex-hot