Bug 17030 – Specialize range functions for isSortedRange

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-12-26T06:29:10Z
Last change time
2024-12-01T16:29:01Z
Keywords
bootcamp
Assigned to
No Owner
Creator
Seb
Moved to GitHub: phobos#9703 →

Comments

Comment #0 by greeenify — 2016-12-26T06:29:10Z
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.
Comment #1 by robert.schadek — 2024-12-01T16:29:01Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9703 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB