pyo3/benches
Adam Reichold bd7aed4b12 Add implementation of Iterator::size_hint for PyIterator
When the Python iterator backing `PyIterator` has a `__length_hint__` special
method, we can use this as a lower bound for Rust's `Iterator::size_hint` to
e.g. support pre-allocation of collections.

This is implemented using `PyObject_LengthHint` which is not available in the
stable ABI and hence so is `Iterator::size_hint`. This should be fine since this
is an optimization in any case and the stable ABI is expected to have slightly
worse performance overall.
2023-07-09 10:16:20 +02:00
..
bench_any.rs Add implementation of Iterator::size_hint for PyIterator 2023-07-09 10:16:20 +02:00
bench_call.rs Add more lints 2022-03-23 08:07:28 +01:00
bench_comparisons.rs support ordering magic methods for `#[pyclass]` 2023-06-04 13:58:18 +01:00
bench_decimal.rs implement Decimal to rust_decimal conversions 2023-04-22 19:55:21 +02:00
bench_dict.rs add benchmark for mapping conversion from dicts 2023-02-15 08:27:18 +00:00
bench_err.rs Add more lints 2022-03-23 08:07:28 +01:00
bench_extract.rs Add benchmark showing that extract::<i64> is costly due to PyNumber_Index trying hard. 2023-05-26 07:47:45 +02:00
bench_frompyobject.rs Py/PyAny: deprecate cast_as() in favor of downcast() 2022-11-18 07:00:40 +01:00
bench_gil.rs clippy: fixes flagged by beta toolchain 2022-08-14 07:44:11 +01:00
bench_intern.rs ci: run checks for all platforms on PR 2022-12-25 20:02:21 +00:00
bench_list.rs add benchmarks for sequence conversions 2023-02-15 08:28:29 +00:00
bench_pyclass.rs change PyModule::add_class to return an error if class creation fails 2023-02-14 22:08:35 +00:00
bench_pyobject.rs Use Python:;with_gil in tests 2022-07-19 19:34:23 +02:00
bench_set.rs remove unneeded into_iter calls 2023-01-27 08:20:03 +00:00
bench_tuple.rs Add `PyTuple::to_list` 2023-03-18 14:44:45 +00:00