LanguagesRuby
rubyperf
Ruby performance notes, small examples, and rubyperf-lint.
Part of XPerf. Shared docs: docs/README.md. The lint is corpus-ready (heuristic). Defaults: rb-string-plus-hot, rb-array-plus-rebind, rb-puts-hot off; regexp / JSON / file-read hint. rb-hash-merge-in-loop was removed. Guide v0.
Contents
- English guide (v0) — from
docs/guide-src/ rubyperf-lint— rb-string-plus-hot–rb-file-read-hot- Corpus pins
Focus
Prefer << over string +=, avoid Array + rebinding in loops, gate hot puts/print.
Run lint
cd packages/rubyperf
ruby rubyperf-lint/rubyperf-lint.rb path/to/sources
bash scripts/smoke-lint.sh
bash scripts/self-lint.shExit 1 only for error-severity findings (hints exit 0 unless --strict-hints).
Layout
docs/guide-src/ chapter sources
docs/ assembled guide + corpus.md + evidence-policy.md
evidence/ per-rule claim + measured JSONL (all four rules)
examples/ tiny demos
rubyperf-lint/ checker + fixtures
scripts/ smoke-lint.sh, self-lint.sh