Avatar for the astral-sh user
astral-sh
ruff
BlogDocsChangelog

[ty] Cache `KnownClass::to_class_literal`

#22000Merged
Comparing
micha/cache-known-class-to-class-literal
(
e73332b
) with
main
(
01c0a3e
)
CodSpeed Performance Gauge
+17%
Improvement
5
Untouched
8
Skipped
30
Archived
9

Benchmarks

52 total
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
5.2 ms*
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
830.1 µs*
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
109.2 µs*
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
329.7 µs*
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
79.3 µs*
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
5.1 ms*
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
8.5 ms*
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
510.1 µs*
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
3.6 ms*
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
728.9 µs*
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
4.3 ms*
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
10.1 ms*
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
2.2 ms*
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
18.5 ms*
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
949 µs*
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
4.3 ms*
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
2 ms*
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
2.2 ms*
large[pydantic]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
-3%
205.4 s210.8 s
large[sympy]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+7%
55.7 s51.9 s
small[altair]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+11%
5.6 s5 s
small[freqtrade]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+5%
8.5 s8.1 s
small[tanjun]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+5%
2.7 s2.5 s
medium[static-frame]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+6%
20.9 s19.7 s
multithreaded[altair]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+17%
1.6 s1.4 s

Commits

Click on a commit to change the comparison range
Base
main
01c0a3e
+20.14%
[ty] Cache `KnownClass::to_class_literal`
df87ab5
6 months ago
by MichaReiser
-15.54%
Add heap size to new interned argument
7116d1d
6 months ago
by MichaReiser
+12.85%
Update crates/ty_python_semantic/src/types/class.rs
e73332b
6 months ago
by MichaReiser
© 2026 CodSpeed Technology
Home Terms Privacy Docs