Avatar for the PyO3 user
PyO3
pyo3
BlogDocs

Make #wrap_pyfunction return a Bound value

#3808Closed
Comparing
snuderl:wrap_pyfunction-bound
(
0e43071
) with
main
(
030a618
)
-16%
Improvements
0
Regressions
1
Untouched
63
New
0
Dropped
0
Ignored
15

Benchmarks

Failed

f64_from_pyobjectRegression
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::f64_from_pyobject
-16%
308.3 ns
366.7 ns

Passed

identify_object_type
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark::identify_object_type
+3%
15.9 µs
15.5 µs
test_empty_class_init
pytests/tests/test_pyclasses.py::test_empty_class_init
+2%
23.3 µs
22.9 µs
extract_float_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_extract_fail
+1%
12.3 µs
12.1 µs
test_simple_args_rs
pytests/tests/test_pyfunctions.py::test_simple_args_rs
+1%
22.2 µs
21.9 µs
test_empty_class_init_py
pytests/tests/test_pyclasses.py::test_empty_class_init_py
+1%
16.9 µs
16.7 µs
test_none_py
pytests/tests/test_pyfunctions.py::test_none_py
+1%
12.5 µs
12.4 µs
tuple_into_py
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_into_py
+1%
2.9 µs
2.9 µs
ordered_dunder_methods
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark::ordered_dunder_methods
+1%
3.1 µs
3.1 µs
test_none_rs
pytests/tests/test_pyfunctions.py::test_none_rs
+1%
13.1 µs
13 µs
test_simple_kwargs_py
pytests/tests/test_pyfunctions.py::test_simple_kwargs_py
+1%
23.6 µs
23.4 µs
test_simple_args_kwargs_rs
pytests/tests/test_pyfunctions.py::test_simple_args_kwargs_rs
0%
24.4 µs
24.3 µs
first_time_init
pyo3-benches/benches/bench_pyclass.rs::benches::criterion_benchmark::first_time_init
0%
38.7 µs
38.5 µs
test_simple_args_py
pytests/tests/test_pyfunctions.py::test_simple_args_py
0%
19 µs
19 µs
test_args_kwargs_py
pytests/tests/test_pyfunctions.py::test_args_kwargs_py
0%
22.3 µs
22.2 µs
extract_int_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_extract_fail
0%
11.5 µs
11.5 µs
not_a_list_via_extract_enum
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_extract_enum
0%
13.2 µs
13.2 µs
test_args_kwargs_rs
pytests/tests/test_pyfunctions.py::test_args_kwargs_rs
0%
18 µs
18 µs
extract_bigint_huge_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_huge_positive
0%
12.3 µs
12.3 µs
test_simple_args_kwargs_py
pytests/tests/test_pyfunctions.py::test_simple_args_kwargs_py
0%
22.5 µs
22.5 µs
dict_new
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::dict_new
0%
25.3 ms
25.3 ms
call_method_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_method_0
0%
617.8 µs
617.7 µs
extract_hashmap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::extract_hashmap
0%
20 ms
20 ms
tuple_get_borrowed_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_borrowed_item
0%
3.6 ms
3.6 ms
list_get_item
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_get_item
0%
3.8 ms
3.8 ms
list_get_item_unchecked
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_get_item_unchecked
0%
3.3 ms
3.3 ms
tuple_get_item
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_item
0%
3.8 ms
3.8 ms
iter_list
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::iter_list
0%
6.1 ms
6.1 ms
tuple_get_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_item_unchecked
0%
3.2 ms
3.2 ms
iter_tuple
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::iter_tuple
0%
5.3 ms
5.3 ms
iter_dict
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::iter_dict
0%
13.5 ms
13.5 ms
iter_set
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::iter_set
0%
10.3 ms
10.3 ms
set_new
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::set_new
0%
16.5 ms
16.5 ms
tuple_get_borrowed_item_unchecked
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_get_borrowed_item_unchecked
0%
3 ms
3 ms
collect_generic_iterator
pyo3-benches/benches/bench_any.rs::benches::criterion_benchmark::collect_generic_iterator
0%
91.4 ms
91.4 ms
dict_get_item
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::dict_get_item
0%
16.6 ms
16.6 ms
tuple_new
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_new
0%
7.1 ms
7.1 ms
extract_btreemap
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::extract_btreemap
0%
36.4 ms
36.4 ms
extract_bigint_extract_fail
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_extract_fail
0%
11.4 µs
11.4 µs
decimal_via_extract
pyo3-benches/benches/bench_decimal.rs::benches::criterion_benchmark::decimal_via_extract
0%
14.7 µs
14.7 µs
err_new_without_gil
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark::err_new_without_gil
0%
1.3 µs
1.3 µs
extract_float_downcast_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_downcast_fail
0%
399.4 ns
399.4 ns
dirty_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark::dirty_acquire_gil
0%
4.5 µs
4.5 µs
getattr_intern
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark::getattr_intern
0%
3.2 µs
3.2 µs
extract_btreeset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::extract_btreeset
0%
15.4 ms
15.4 ms
tuple_to_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_to_list
0%
1.6 ms
1.6 ms
list_new
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::list_new
0%
7.1 ms
7.1 ms
tuple_new_list
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::tuple_new_list
0%
2.2 ms
2.2 ms
call_0
pyo3-benches/benches/bench_call.rs::benches::criterion_benchmark::call_0
0%
213.8 µs
213.9 µs
extract_bigint_huge_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_huge_negative
0%
13.5 µs
13.5 µs
extract_hashset
pyo3-benches/benches/bench_set.rs::benches::criterion_benchmark::extract_hashset
0%
20.9 ms
20.9 ms
test_simple_rs
pytests/tests/test_pyfunctions.py::test_simple_rs
0%
20.8 µs
20.8 µs
drop_many_objects
pyo3-benches/benches/bench_pyobject.rs::benches::criterion_benchmark::drop_many_objects
0%
11.6 µs
11.7 µs
err_new_restore_and_fetch
pyo3-benches/benches/bench_err.rs::benches::criterion_benchmark::err_new_restore_and_fetch
0%
7.5 µs
7.5 µs
test_simple_py
pytests/tests/test_pyfunctions.py::test_simple_py
-1%
19 µs
19.2 µs
extract_bigint_big_negative
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_big_negative
-1%
4.1 µs
4.1 µs
extract_bigint_big_positive
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_big_positive
-1%
3.8 µs
3.9 µs
clean_acquire_gil
pyo3-benches/benches/bench_gil.rs::benches::criterion_benchmark::clean_acquire_gil
-1%
3.5 µs
3.6 µs
enum_from_pyobject
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::enum_from_pyobject
-1%
18.7 µs
18.9 µs
not_a_list_via_extract
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_extract
-2%
1.7 µs
1.8 µs
ordered_richcmp
pyo3-benches/benches/bench_comparisons.rs::benches::criterion_benchmark::ordered_richcmp
-2%
3 µs
3.1 µs
extract_bigint_small
pyo3-benches/benches/bench_bigint.rs::benches::criterion_benchmark::extract_bigint_small
-3%
3 µs
3.1 µs
test_simple_kwargs_rs
pytests/tests/test_pyfunctions.py::test_simple_kwargs_rs
-5%
23.2 µs
24.4 µs
extract_str_extract_fail
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_extract_fail
-6%
1.8 µs
2 µs

Ignored

mapping_from_dictIgnored
pyo3-benches/benches/bench_dict.rs::benches::criterion_benchmark::mapping_from_dict
+24%
300 ns
241.7 ns
extract_float_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_downcast_success
-7%
370 ns
399.2 ns
extract_float_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_float_extract_success
-7%
368.6 ns
397.8 ns
extract_int_downcast_failIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_downcast_fail
+16%
216.1 ns
186.9 ns
extract_int_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_downcast_success
-11%
495 ns
553.3 ns
extract_int_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_int_extract_success
-11%
493.6 ns
551.9 ns
extract_str_downcast_failIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_downcast_fail
+16%
216.1 ns
186.9 ns
extract_str_downcast_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_downcast_success
0%
553.9 ns
553.9 ns
extract_str_extract_successIgnored
pyo3-benches/benches/bench_extract.rs::benches::criterion_benchmark::extract_str_extract_success
0%
830.3 ns
830.3 ns
list_via_downcastIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::list_via_downcast
0%
178.1 ns
178.1 ns
list_via_extractIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::list_via_extract
0%
276.9 ns
276.9 ns
not_a_list_via_downcastIgnored
pyo3-benches/benches/bench_frompyobject.rs::benches::criterion_benchmark::not_a_list_via_downcast
+16%
212.2 ns
183.1 ns
getattr_directIgnored
pyo3-benches/benches/bench_intern.rs::benches::criterion_benchmark::getattr_direct
0%
6.7 µs
6.7 µs
sequence_from_listIgnored
pyo3-benches/benches/bench_list.rs::benches::criterion_benchmark::sequence_from_list
+22%
329.2 ns
270.8 ns
sequence_from_tupleIgnored
pyo3-benches/benches/bench_tuple.rs::benches::criterion_benchmark::sequence_from_tuple
0%
209.4 ns
209.4 ns

Commits

Click on a commit to change the comparison range
Base
main
030a618
-16%
Make #wrap_pyfunction return a Bound value, and update module.add_method to accept it
0e43071
10 months ago
by snuderl
Home Terms PrivacyDocs