roaring-rs icon indicating copy to clipboard operation
roaring-rs copied to clipboard

Lazily compute Iterator len

Open Dr-Emann opened this issue 1 year ago • 0 comments

Lazily compute the length of an iterator, rather than doing so eagerly at creation time.

Additionally, add more efficient implementations of count, nth, and nth_back.

This required somewhat manually reimplementing std::iter::Flatten, but this is something we'll need to do anyway for #290 / #287.

This is currently built on top of #292, (so the PR currently includes commits from that PR too)

Fixes #294

Dr-Emann avatar Oct 16 '24 04:10 Dr-Emann