You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now BoundListIterator::nth will call nextn times (I think, please correct me if I'm misinterpreting), when instead it could get the nth item immediately. We should override Iterator::nth and DoubleEndedIterator::nth_back on stable rust and Iterator::advance_by and DoubleEndedIterator::advance_back_by on nightly rust to do constant-time indexing for all of the list and tuple iterator stucts.
The text was updated successfully, but these errors were encountered:
ngoldbaum
changed the title
Implement nth and nth_back for list and tuple iterators
Implement nth and nth_back for list and tuple iterators
Dec 10, 2024
Right now
BoundListIterator::nth
will callnext
n
times (I think, please correct me if I'm misinterpreting), when instead it could get thenth
item immediately. We should overrideIterator::nth
andDoubleEndedIterator::nth_back
on stable rust andIterator::advance_by
andDoubleEndedIterator::advance_back_by
on nightly rust to do constant-time indexing for all of the list and tuple iterator stucts.The text was updated successfully, but these errors were encountered: