Avatar for the PyO3 user
PyO3
pyo3
BlogDocsChangelog

introduce fast path to `LazyTypeObject::get_or_init`

#5324Merged
Comparing
davidhewitt:type-object-fast-path
(
03334ff
) with
main
(
15045db
)
CodSpeed Performance Gauge
-13%
Improvement
2
Untouched
90
Ignored
19

Benchmarks

111 total
ordered_richcmp
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+21%
3.2 µs2.6 µs
ordered_dunder_methods
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+12%
3.1 µs2.8 µs
vec_into_pyobject
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+5%
2.7 µs2.5 µs
test_getter
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+3%
16.7 µs16.3 µs
err_new_without_gil
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+2%
1.3 µs1.2 µs
test_setter
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+2%
17.2 µs16.9 µs
extract_bigint_small
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+2%
2.7 µs2.7 µs
extract_bigint_big_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+2%
3.7 µs3.6 µs
extract_bigint_big_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
4 µs3.9 µs
err_new_restore_and_fetch
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
8.1 µs7.9 µs
test_method_call
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
15.1 µs14.9 µs
test_none_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
13.3 µs13.2 µs
test_empty_class_init_py
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
14 µs13.9 µs
tuple_into_pyobject
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
2.9 µs2.8 µs
test_simple_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
17.3 µs17.2 µs
extract_hashbrown_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
16.3 ms16.1 ms
test_proto_call
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
13.5 µs13.4 µs
test_method_call_py
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
13.9 µs13.7 µs
test_static_method
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
15.8 µs15.6 µs
test_none_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
12.6 µs12.5 µs
tuple_nth
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
4.2 µs4.2 µs
test_simple_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
18.4 µs18.3 µs
test_class_method
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
17.9 µs17.7 µs
test_simple_args_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
17.8 µs17.7 µs
test_positional_only_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
+1%
13.7 µs13.6 µs

Commits

Click on a commit to change the comparison range
Base
main
15045db
+21.17%
fix changelog name
0c2eb82
6 months ago
by davidhewitt
-0.23%
fixup benchmark
123ed18
6 months ago
by davidhewitt
-0.45%
fixup clippy
8795748
6 months ago
by davidhewitt
0%
fixup doc
eca3aa9
6 months ago
by davidhewitt
-33.33%
Merge branch 'main' into type-object-fast-path
03334ff
6 months ago
by davidhewitt
© 2026 CodSpeed Technology
Home Terms Privacy Docs