Skip to content

Consider optimizations to FindIndex based on the underlying type #697

Open
@Treit

Description

List<T> and T[] support a FindIndex operation.

The SuperLinq FindIndex operation could detect if the underlying type is one of these and call the native implementation as an optimization.

Currently, benchmarks shows that calling someList.ToList().FindIndex(predicate) is actually faster than the SuperLinq implmentation, although of course it allocates a lot more memory.

Invoking the underlying method would provide better performance and avoid the memory allocation of calling ToList() to get access to the faster FindIndex method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions