www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17030] New: Specialize range functions for isSortedRange


          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 puremagic.com
          Reporter: greeenify gmail.com

If a range is sorted, range algorithms should take advantage of it.
For a motivation you may also read:


Since three weeks `find` has a specialization for SortedRanges


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.

Dec 25 2016