astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
31.4k stars 1.05k forks source link

Use `Box<str>` for `Identifier #12100

Closed MichaReiser closed 3 months ago

MichaReiser commented 3 months ago
codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #12100 will improve performances by 7.68%

Comparing name-box-str (e41728a) with main (47b2273)

Summary

⚡ 4 improvements ✅ 26 untouched benchmarks

Benchmarks breakdown

Benchmark main name-box-str Change
parser[large/dataset.py] 5.4 ms 5 ms +7.68%
parser[numpy/ctypeslib.py] 1,007.9 µs 958.4 µs +5.16%
parser[pydantic/types.py] 2.2 ms 2.1 ms +5.25%
parser[unicode/pypinyin.py] 329.3 µs 314 µs +4.85%
MichaReiser commented 3 months ago

Closing in favor of https://github.com/astral-sh/ruff/pull/12101 which shows the most promising results