Summary: std.algorithm.find fails to take advantage of
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from Jonathan M Davis <> 2012-10-15 22:18:53 
PDT ---
find should be able to take advantage of SortedRange at least some of the time.
At minimum, the overload which takes a single element for the needle should use
upperBound on SortedRange rather than searching through the range element by
element. I don't know how often it can really take advantage of it, because it
must be able to verify that the predicates are the same, but that should be
feasible for at least the default predicate (and probably any string

Similarly, canFind should be able to use SortedRange's contains function.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to