Bug 11667 – std.algorithm.find() should take advantage of SortedRange
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-03T00:58:00Z
Last change time
2016-12-26T06:29:55Z
Assigned to
nobody
Creator
advmail
Comments
Comment #0 by advmail — 2013-12-03T00:58:07Z
When used with a SortedRange, std.algorithm.find() should search an item using a binary search in O(log(n)). Now it performs a O(n) scan.
Maybe it could use lowerbound() function inside std.range.