XPerf
LanguagesObjective-CEvidence

oc-nsstring-append-hot — NSString append vs NSMutableString

Status: measured (gnustep)

Claim

GNUstep: stringByAppendingFormat in a loop vs NSMutableString ~569× at N=15000.

How measured

Runtime (this evidence file)

FieldValue
When2026-10-22 Asia/Shanghai (JSONL ts is UTC)
runtimegnustep
Median before (stringByAppending)~1236 ms
Median after (mutable_string)~2.172 ms
ratio before/after~569×

Lint mapping

objcperf-lint oc-nsstring-append-hot: default stays off.

Limits

  • The harness times stringByAppendingFormat:; the lint matches stringByAppendingString only.
  • Strong on GNUstep; Apple runtime may differ. Default stays off.