Avatar for the PyO3 user
PyO3
pyo3
BlogDocsChangelog

make `PyErrState` thread-safe

#4671Merged
Comparing
davidhewitt:threadsafe-err
(
cd39af0
) with
main
(
d45e0bd
)
CodSpeed Performance Gauge
-27%
Improvements
0
Regressions
2
Untouched
81
New
0
Dropped
0
Ignored
17

Benchmarks

Failed

enum_from_pyobjectRegression
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::enum_from_pyobject
CodSpeed Performance Gauge
-24%
19 µs
25 µs
not_a_list_via_extract_enumRegression
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_extract_enum
CodSpeed Performance Gauge
-27%
13.4 µs
18.3 µs

Passed

extract_str_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_extract_fail
CodSpeed Performance Gauge
+1%
2 µs
2 µs
tuple_get_borrowed_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_borrowed_item
CodSpeed Performance Gauge
+1%
3.9 ms
3.9 ms
getattr_intern
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark::getattr_intern
CodSpeed Performance Gauge
+1%
3 µs
3 µs
test_proto_call_py
pytests/tests/test_pyclasses.py::test_proto_call_py
CodSpeed Performance Gauge
+1%
13.9 µs
13.8 µs
list_get_item
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_get_item
CodSpeed Performance Gauge
0%
4.1 ms
4.1 ms
extract_hashmap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::extract_hashmap
CodSpeed Performance Gauge
0%
20.8 ms
20.7 ms
extract_hashbrown_map
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::extract_hashbrown_map
CodSpeed Performance Gauge
0%
18 ms
17.9 ms
call_method_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_method_0
CodSpeed Performance Gauge
0%
592.9 µs
591.7 µs
dict_new
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::dict_new
CodSpeed Performance Gauge
0%
25.8 ms
25.7 ms
call_1
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_1
CodSpeed Performance Gauge
0%
380.6 µs
380.4 µs
call_one_arg
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_one_arg
CodSpeed Performance Gauge
0%
348 µs
347.8 µs
call_method_one_arg
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_method_one_arg
CodSpeed Performance Gauge
0%
966.4 µs
966 µs
call_method_1
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_method_1
CodSpeed Performance Gauge
0%
1 ms
1 ms
call
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call
CodSpeed Performance Gauge
0%
756.6 µs
756.5 µs
extract_hashset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::extract_hashset
CodSpeed Performance Gauge
0%
20.5 ms
20.5 ms
tuple_new
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_new
CodSpeed Performance Gauge
0%
7.1 ms
7.1 ms
tuple_new_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_new_list
CodSpeed Performance Gauge
0%
2.1 ms
2.1 ms
extract_btreeset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::extract_btreeset
CodSpeed Performance Gauge
0%
15.6 ms
15.6 ms
tuple_get_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_item
CodSpeed Performance Gauge
0%
4.1 ms
4.1 ms
call_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_0
CodSpeed Performance Gauge
0%
196.5 µs
196.5 µs
extract_float_downcast_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_downcast_fail
CodSpeed Performance Gauge
0%
396.7 ns
396.7 ns
dirty_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark::dirty_acquire_gil
CodSpeed Performance Gauge
0%
4.9 µs
4.9 µs
tuple_into_py
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_into_py
CodSpeed Performance Gauge
0%
3 µs
3 µs
collect_generic_iterator
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark::collect_generic_iterator
CodSpeed Performance Gauge
0%
105.9 ms
105.9 ms
tuple_get_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_item_unchecked
CodSpeed Performance Gauge
0%
3.6 ms
3.6 ms
iter_tuple
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::iter_tuple
CodSpeed Performance Gauge
0%
5.9 ms
5.9 ms
iter_dict
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::iter_dict
CodSpeed Performance Gauge
0%
11.4 ms
11.4 ms
dict_get_item
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::dict_get_item
CodSpeed Performance Gauge
0%
16.3 ms
16.3 ms
tuple_get_borrowed_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_borrowed_item_unchecked
CodSpeed Performance Gauge
0%
3.4 ms
3.4 ms
set_new
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::set_new
CodSpeed Performance Gauge
0%
15.1 ms
15.1 ms
extract_btreemap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::extract_btreemap
CodSpeed Performance Gauge
0%
37.8 ms
37.8 ms
iter_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::iter_set
CodSpeed Performance Gauge
0%
10.5 ms
10.5 ms
iter_list
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::iter_list
CodSpeed Performance Gauge
0%
6.7 ms
6.7 ms
list_new
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_new
CodSpeed Performance Gauge
0%
7.2 ms
7.2 ms
bytes_new_large
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::bytes_new_large
CodSpeed Performance Gauge
0%
176.9 µs
176.9 µs
tuple_to_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_to_list
CodSpeed Performance Gauge
0%
1.6 ms
1.6 ms
list_get_item_unchecked
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_get_item_unchecked
CodSpeed Performance Gauge
0%
3.6 ms
3.6 ms
byte_slice_into_pyobject_large
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::byte_slice_into_pyobject_large
CodSpeed Performance Gauge
0%
176.9 µs
177 µs
extract_float_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_extract_fail
CodSpeed Performance Gauge
0%
11.7 µs
11.7 µs
drop_many_objects_without_gil
pyo3-benches/benches/bench_pyobject.rs::benches::criterion_benchmark::drop_many_objects_without_gil
CodSpeed Performance Gauge
0%
40.3 µs
40.4 µs
extract_hashbrown_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::extract_hashbrown_set
CodSpeed Performance Gauge
0%
16 ms
16 ms
test_none_py
pytests/tests/test_pyfunctions.py::test_none_py
CodSpeed Performance Gauge
0%
12.1 µs
12.2 µs
drop_many_objects
pyo3-benches/benches/bench_pyobject.rs::benches::criterion_benchmark::drop_many_objects
CodSpeed Performance Gauge
0%
11.3 µs
11.4 µs
vec_into_py
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::vec_into_py
CodSpeed Performance Gauge
0%
9.8 µs
9.8 µs
test_args_kwargs_py
pytests/tests/test_pyfunctions.py::test_args_kwargs_py
CodSpeed Performance Gauge
0%
18.5 µs
18.5 µs
test_simple_args_py
pytests/tests/test_pyfunctions.py::test_simple_args_py
CodSpeed Performance Gauge
0%
17.3 µs
17.4 µs
test_simple_py
pytests/tests/test_pyfunctions.py::test_simple_py
CodSpeed Performance Gauge
0%
17 µs
17.1 µs
identify_object_type
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark::identify_object_type
CodSpeed Performance Gauge
0%
14.9 µs
15 µs
call_method
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_method
CodSpeed Performance Gauge
-1%
1.4 ms
1.4 ms
test_simple_args_kwargs_py
pytests/tests/test_pyfunctions.py::test_simple_args_kwargs_py
CodSpeed Performance Gauge
-1%
20.1 µs
20.2 µs
extract_int_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_extract_fail
CodSpeed Performance Gauge
-1%
11.5 µs
11.6 µs
test_empty_class_init_py
pytests/tests/test_pyclasses.py::test_empty_class_init_py
CodSpeed Performance Gauge
-1%
13.8 µs
13.9 µs
test_method_call_py
pytests/tests/test_pyclasses.py::test_method_call_py
CodSpeed Performance Gauge
-1%
13.3 µs
13.4 µs
test_proto_call
pytests/tests/test_pyclasses.py::test_proto_call
CodSpeed Performance Gauge
-1%
13.1 µs
13.2 µs
first_time_init
pyo3-benches/benches/bench_pyclass.rs::benches::criterion_benchmark::first_time_init
CodSpeed Performance Gauge
-1%
39 µs
39.3 µs
test_none_rs
pytests/tests/test_pyfunctions.py::test_none_rs
CodSpeed Performance Gauge
-1%
12 µs
12.1 µs
test_empty_class_init
pytests/tests/test_pyclasses.py::test_empty_class_init
CodSpeed Performance Gauge
-1%
21.4 µs
21.5 µs
clean_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark::clean_acquire_gil
CodSpeed Performance Gauge
-1%
3.3 µs
3.3 µs
test_simple_args_rs
pytests/tests/test_pyfunctions.py::test_simple_args_rs
CodSpeed Performance Gauge
-1%
19.8 µs
19.9 µs
extract_bigint_huge_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_huge_positive
CodSpeed Performance Gauge
-1%
12.1 µs
12.2 µs
test_simple_kwargs_py
pytests/tests/test_pyfunctions.py::test_simple_kwargs_py
CodSpeed Performance Gauge
-1%
19.8 µs
20 µs
extract_bigint_extract_fail
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_extract_fail
CodSpeed Performance Gauge
-1%
11.7 µs
11.8 µs
test_simple_args_kwargs_rs
pytests/tests/test_pyfunctions.py::test_simple_args_kwargs_rs
CodSpeed Performance Gauge
-1%
19.1 µs
19.3 µs
test_args_kwargs_rs
pytests/tests/test_pyfunctions.py::test_args_kwargs_rs
CodSpeed Performance Gauge
-1%
13.6 µs
13.8 µs
test_method_call
pytests/tests/test_pyclasses.py::test_method_call
CodSpeed Performance Gauge
-1%
14.1 µs
14.3 µs
test_simple_kwargs_rs
pytests/tests/test_pyfunctions.py::test_simple_kwargs_rs
CodSpeed Performance Gauge
-1%
18.8 µs
19 µs
extract_bigint_huge_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_huge_negative
CodSpeed Performance Gauge
-1%
13 µs
13.2 µs
test_simple_rs
pytests/tests/test_pyfunctions.py::test_simple_rs
CodSpeed Performance Gauge
-2%
18.3 µs
18.6 µs
extract_bigint_big_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_big_positive
CodSpeed Performance Gauge
-2%
3.6 µs
3.7 µs
extract_bigint_small
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_small
CodSpeed Performance Gauge
-2%
2.7 µs
2.8 µs
vec_into_pyobject
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::vec_into_pyobject
CodSpeed Performance Gauge
-2%
2.6 µs
2.7 µs
decimal_via_extract
pyo3-benches/benches/bench_decimal.rs::benches::criterion_benchmark::decimal_via_extract
CodSpeed Performance Gauge
-2%
14.6 µs
14.9 µs
extract_bigint_big_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_big_negative
CodSpeed Performance Gauge
-3%
3.8 µs
3.9 µs
not_a_list_via_extract
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_extract
CodSpeed Performance Gauge
-3%
1.9 µs
2 µs
byte_slice_into_py
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::byte_slice_into_py
CodSpeed Performance Gauge
-3%
1.7 µs
1.7 µs
byte_slice_into_pyobject_medium
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::byte_slice_into_pyobject_medium
CodSpeed Performance Gauge
-3%
1.7 µs
1.7 µs
err_new_restore_and_fetch
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark::err_new_restore_and_fetch
CodSpeed Performance Gauge
-3%
7.7 µs
8 µs
bytes_new_medium
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::bytes_new_medium
CodSpeed Performance Gauge
-3%
1.6 µs
1.7 µs
ordered_richcmp
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark::ordered_richcmp
CodSpeed Performance Gauge
-4%
3 µs
3.1 µs
ordered_dunder_methods
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark::ordered_dunder_methods
CodSpeed Performance Gauge
-5%
3 µs
3.1 µs
err_new_without_gil
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark::err_new_without_gil
CodSpeed Performance Gauge
-7%
1.3 µs
1.4 µs

Ignored

mapping_from_dictIgnored
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::mapping_from_dict
CodSpeed Performance Gauge
+11%
300 ns
270.8 ns
extract_float_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_downcast_success
CodSpeed Performance Gauge
0%
178.3 ns
178.3 ns
extract_float_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_extract_success
CodSpeed Performance Gauge
+19%
363.6 ns
305.3 ns
extract_int_downcast_failIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_downcast_fail
CodSpeed Performance Gauge
-7%
396.9 ns
426.1 ns
extract_int_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_downcast_success
CodSpeed Performance Gauge
-5%
558.9 ns
588.1 ns
extract_int_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_extract_success
CodSpeed Performance Gauge
0%
494.4 ns
494.4 ns
extract_str_downcast_failIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_downcast_fail
CodSpeed Performance Gauge
0%
396.7 ns
396.7 ns
extract_str_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_downcast_success
CodSpeed Performance Gauge
-1%
581.4 ns
584.4 ns
extract_str_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_extract_success
CodSpeed Performance Gauge
-18%
547.8 ns
668.1 ns
list_via_downcastIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::list_via_downcast
CodSpeed Performance Gauge
0%
149.2 ns
149.2 ns
list_via_extractIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::list_via_extract
CodSpeed Performance Gauge
-24%
183.6 ns
241.9 ns
not_a_list_via_downcastIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_downcast
CodSpeed Performance Gauge
+16%
425.8 ns
367.5 ns
getattr_directIgnored
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark::getattr_direct
CodSpeed Performance Gauge
+1%
6.8 µs
6.7 µs
byte_slice_into_pyobject_smallIgnored
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::byte_slice_into_pyobject_small
CodSpeed Performance Gauge
-7%
394.4 ns
423.6 ns
bytes_new_smallIgnored
pyo3-benches/benches/bench_intopyobject.rs::benches::criterion_benchmark::bytes_new_small
CodSpeed Performance Gauge
0%
365.3 ns
365.3 ns
sequence_from_listIgnored
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::sequence_from_list
CodSpeed Performance Gauge
-19%
241.7 ns
300 ns
sequence_from_tupleIgnored
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::sequence_from_tuple
CodSpeed Performance Gauge
0%
455 ns
455 ns

Commits

Click on a commit to change the comparison range
Base
main
d45e0bd
0%
make `PyErrState` thread-safe
08beaa5
2 months ago
by davidhewitt
0%
fix clippy
8421034
2 months ago
by ngoldbaum
-25%
newsfragment
4a30dde
2 months ago
by davidhewitt
0%
fix MSRV
f5fa452
2 months ago
by davidhewitt
+1%
fix nightly build
d5ba475
2 months ago
by davidhewitt
-2%
Update err_state.rs
cd39af0
2 months ago
by ngoldbaum
Home Terms PrivacyDocs