[Issue 17030] New: Specialize range functions for isSortedRange
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Dec 25 22:29:10 PST 2016
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: nobody at puremagic.com
Reporter: greeenify at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list