Skip to content

Iterator nth (and nth_back) must be optimized for contiguous iterators #357

Open
@danakj

Description

@danakj

Slice iterators need to be able to perform nth() in O(1) time, which means Iterator needs to be able to delegate from the default impl to a specific one.

There's a few other important methods like that as well. Then aggressively use those methods from the default methods if there's any opportunities to do so that aren't done yet (mostly they should already be).

fold is also optimized for some iterators in std.rs I believe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of the library systems as a whole, such as concepts

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions