PyO3
pyo3
BlogDocsChangelog

docs: update guide to mention GIL less

#5381Merged
Comparing
davidhewitt:freethreading-doc
(
cf50af8
) with
main
(
aed320b
)
CodSpeed Performance Gauge
0%
Untouched
90
New
2
Dropped
2
Ignored
19

Benchmarks

Failed

clean_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark
Missing
CodSpeed Performance Gauge
N/A
3.6 µsN/A
dirty_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark
Missing
CodSpeed Performance Gauge
N/A
5.2 µsN/A

New

clean_attach
pyo3-benches/benches/bench_attach.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
N/A
N/A3.6 µs
dirty_attach
pyo3-benches/benches/bench_attach.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
N/A
N/A5.2 µs

Passed

test_getter
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+6%
17 µs16.1 µs
err_new_without_gil
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+2%
1.4 µs1.3 µs
extract_bigint_small
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
2.7 µs2.6 µs
tuple_into_pyobject
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
2.9 µs2.8 µs
test_proto_call
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
13.3 µs13.2 µs
extract_bigint_big_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
+1%
3.7 µs3.7 µs
test_method_call
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
+1%
14.8 µs14.7 µs
test_args_kwargs_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
18.8 µs18.7 µs
test_with_typed_args_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
13.5 µs13.4 µs
err_new_restore_and_fetch
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
7.9 µs7.9 µs
test_class_method
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
17.6 µs17.5 µs
test_simple_args_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
17.7 µs17.6 µs
test_simple_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
18.2 µs18.1 µs
test_simple_args_kwargs_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
20.5 µs20.5 µs
drop_many_objects
pyo3-benches/benches/bench_pyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.4 µs11.3 µs
extract_bigint_extract_fail
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.8 µs11.7 µs
extract_float_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.8 µs11.7 µs
test_positional_only_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
13.4 µs13.3 µs
test_positional_only_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
13.6 µs13.6 µs
test_empty_class_init_py
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
13.8 µs13.8 µs
test_args_kwargs_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
14.3 µs14.3 µs
identify_object_type
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
15.6 µs15.6 µs
extract_hashbrown_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
16.1 ms16.1 ms
test_simple_kwargs_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
18.7 µs18.6 µs
test_simple_args_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
19 µs18.9 µs
test_simple_kwargs_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
20.3 µs20.3 µs
call_method_one_arg
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
628.2 µs628.1 µs
call_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
191.6 µs191.6 µs
call_method_1
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
657.5 µs657.5 µs
tuple_new
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
6.7 ms6.7 ms
list_get_item_unchecked
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
list_get_item
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
4.2 ms4.2 ms
tuple_to_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
1.6 ms1.6 ms
iter_tuple
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
5.9 ms5.9 ms
set_new
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
15.2 ms15.2 ms
extract_btreeset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
15.9 ms15.9 ms
iter_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
10.7 ms10.7 ms
dict_new
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
25.7 ms25.7 ms
list_nth
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
4.5 µs4.5 µs
extract_bigint_big_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
4 µs4 µs
list_nth_back
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
4.6 µs4.6 µs
extract_bigint_huge_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
13.3 µs13.3 µs
test_static_method
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
15.4 µs15.4 µs
drop_many_objects_without_gil
pyo3-benches/benches/bench_pyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
41.7 µs41.7 µs
test_method_call_py
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
13.7 µs13.7 µs
call_one_arg
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
232.2 µs232.2 µs
extract_bigint_huge_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.7 µs11.7 µs
call_1
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
253.5 µs253.5 µs
test_none_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
12.5 µs12.5 µs
test_simple_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
17.2 µs17.2 µs
test_with_typed_args_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
17.5 µs17.5 µs
ordered_dunder_methods
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
2.8 µs2.8 µs
vec_into_pyobject
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
2.5 µs2.5 µs
test_class_attribute
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
13.9 µs13.9 µs
extract_str_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
1.8 µs1.8 µs
extract_int_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.7 µs11.7 µs
byte_slice_into_pyobject_medium
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
1.6 µs1.6 µs
iter_list
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
6.8 ms6.8 ms
not_a_list_via_extract_enum
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
17.3 µs17.3 µs
bytes_new_medium
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
1.5 µs1.5 µs
collect_generic_iterator
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
105.4 ms105.4 ms
dict_get_item
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
16.6 ms16.6 ms
iter_dict
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
11.5 ms11.5 ms
tuple_get_borrowed_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
3.4 ms3.4 ms
tuple_new_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
2.1 ms2.1 ms
tuple_get_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
4.1 ms4.1 ms
list_new
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
6.7 ms6.7 ms
tuple_get_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
tuple_get_borrowed_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
3.9 ms3.9 ms
extract_btreemap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
37.8 ms37.8 ms
call_method
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
call
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
609.5 µs609.5 µs
byte_slice_into_pyobject_large
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
176.7 µs176.7 µs
bytes_new_large
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
176.7 µs176.7 µs
call_method_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
608.2 µs608.3 µs
extract_hashmap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
20.7 ms20.7 ms
extract_hashset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
20.7 ms20.7 ms
enum_from_pyobject
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
24.2 µs24.2 µs
extract_hashbrown_map
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
18 ms18 ms
decimal_via_extract
pyo3-benches/benches/bench_decimal.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
0%
15.1 µs15.1 µs
test_none_py
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
13.2 µs13.2 µs
test_setter
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
16.7 µs16.8 µs
test_empty_class_init
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
22.4 µs22.5 µs
test_proto_call_py
pytests/tests/test_pyclasses.py
CodSpeed Performance Gauge
0%
14.2 µs14.2 µs
test_simple_args_kwargs_rs
pytests/tests/test_pyfunctions.py
CodSpeed Performance Gauge
0%
19.1 µs19.2 µs
first_time_init
pyo3-benches/benches/bench_pyclass.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
-1%
39.1 µs39.4 µs
tuple_nth_back
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
-1%
4.3 µs4.3 µs
tuple_nth
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
-1%
4.2 µs4.3 µs
ordered_richcmp
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
-1%
2.6 µs2.6 µs
getattr_intern
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark
CodSpeed Performance Gauge
-2%
3.3 µs3.4 µs

Ignored

sequence_from_list
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
241.1 ns241.1 ns
sequence_from_tuple
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
241.1 ns241.1 ns
extract_int_cast_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-12%
216.4 ns245.6 ns
mapping_from_dict
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
270.3 ns270.3 ns
extract_float_cast_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
178.3 ns178.3 ns
extract_int_extract_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-5%
523.9 ns553.1 ns
extract_float_cast_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-6%
453.9 ns483.1 ns
extract_float_extract_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-9%
305.3 ns334.4 ns
extract_int_cast_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
617.5 ns617.5 ns
byte_slice_into_pyobject_small
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
335 ns335 ns
bytes_new_small
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-10%
276.7 ns305.8 ns
extract_str_cast_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-14%
182.5 ns211.7 ns
extract_str_extract_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
550 ns550 ns
not_a_list_via_cast
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
182.5 ns182.5 ns
extract_str_cast_success
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
+17%
613.3 ns525.8 ns
list_via_cast
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
178.3 ns178.3 ns
list_via_extract
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
213.1 ns213.1 ns
getattr_direct
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
0%
6.5 µs6.6 µs
not_a_list_via_extract
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark
Ignored
CodSpeed Performance Gauge
-2%
1.9 µs1.9 µs

Commits

Click on a commit to change the comparison range
Base
main
aed320b
+0.08%
update guide to mention GIL less
74017e4
3 months ago
by davidhewitt
+0.01%
Apply suggestions from code review Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
cf50af8
3 months ago
by davidhewitt
© 2025 CodSpeed Technology
Home Terms Privacy Docs