I do not want us to add specialization benchmarks one by one in future pull requests so this is mostly done!
Not all of our iterators are benchmarked here:
group_by, chunks, tee, rciter just like in #799.
peeking_take_while and take_while_ref do not take ownership (see #710) of the iterator they adapt and it's therefore problematic to add them to the bench_specializations macro.
process_results does not give an iterator but process one and we can't create a ProcessResults object outside of the library.
MapForGrouping used for GroupingMapBy but it's strictly internal to the library, we will need to benchmark a (non-iterator) method of GroupingMapBy to benchmark the future MapForGrouping::fold.
unfold, iterate: infinite iterators, some benchmarks would not end. We can avoid running them but maybe we should handle them differently later.
After this, we will be able to specialize most fold methods (see #755) faster because their specialization tests/benchmarks are written and we will just need to write the specialization in a commit, run tests, benchmark it before/after and review the PR.
I do not want us to add specialization benchmarks one by one in future pull requests so this is mostly done! Not all of our iterators are benchmarked here:
group_by
,chunks
,tee
,rciter
just like in #799.peeking_take_while
andtake_while_ref
do not take ownership (see #710) of the iterator they adapt and it's therefore problematic to add them to thebench_specializations
macro.process_results
does not give an iterator but process one and we can't create aProcessResults
object outside of the library.MapForGrouping
used forGroupingMapBy
but it's strictly internal to the library, we will need to benchmark a (non-iterator) method ofGroupingMapBy
to benchmark the futureMapForGrouping::fold
.unfold
,iterate
: infinite iterators, some benchmarks would not end. We can avoid running them but maybe we should handle them differently later.After this, we will be able to specialize most
fold
methods (see #755) faster because their specialization tests/benchmarks are written and we will just need to write the specialization in a commit, run tests, benchmark it before/after and review the PR.