Skip to content

Avoid Iterator allocations when calling Sort.isSorted() #2445

@mp911de

Description

@mp911de

Sort.isSorted uses internally isEmpty which defaults to Streamable.isEmpty that obtains an iterator to check emptiness. We should implement isEmpty() properly to check whether the backing object is empty to avoid allocations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions