LanguagesRuby
rubyperf evidence policy
Gate
A rule may be treated as error only if both exist under packages/rubyperf/evidence/:
<RULE>.md— claim, how measured, toolchain version, limits<RULE>.jsonl— ≥1 before/after line withrule,case,median_ms,ops,ratio,ts
Otherwise the rule stays hint (or off).
Measured JSONL alone does not escalate a rule: the flagged smell must also hold up on the G3 corpus triage (see corpus.md).
Current map
As of 2026-10-22.
| Rule | Severity (default) | Evidence | Smell |
|---|---|---|---|
| rb-string-plus-hot | off | yes (rb-string-plus-hot.md + .jsonl, ~32×) | string += in loop (prefer <<) |
| rb-array-plus-rebind | off | yes (rb-array-plus-rebind.md + .jsonl, ~181×) | Array + / concat rebinding in loop |
| rb-puts-hot | off | yes (rb-puts-hot.md + .jsonl, ~5×; I/O is environment-dependent) | puts / print in loop |
| rb-regexp-new-hot | hint | measured (rb-regexp-new-hot.md + rb-regexp-new-hot.jsonl); stay hint | Regexp.new in loop; not corpus-triaged |
| rb-json-hot | hint | measured (rb-json-hot.md + rb-json-hot.jsonl); stay hint | JSON.parse / generate in loop; not corpus-triaged |
| rb-file-read-hot | hint | measured (rb-file-read-hot.md + rb-file-read-hot.jsonl); stay hint | File.read / File.open in a loop; same path only; not corpus-triaged |
No rule is error: the ratios are real but the three off rules were demoted after G3 OK-idiom triage. rb-hash-merge-in-loop was removed: on Ruby 4.0.8 the literal build was slower than merge and allocated more.