https://issues.dlang.org/show_bug.cgi?id=17030
Issue ID: 17030
Summary: Specialize range functions for isSortedRange
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
If a range is sorted, range algorithms should take advantage of it.
For a motivation you may also read:
https://github.com/dlang/phobos/pull/3534
Since three weeks `find` has a specialization for SortedRanges
https://github.com/dlang/phobos/pull/4907
and more functions could take advantage of a similar behavior (e.g. minPos,
minElement, minIndex, isSorted, ...)
Moreover I would like to stress that at the moment the comparison is done with
a string lambda, which means that for user-defined lambdas we can't take any
advantage at the moment.
--