www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8829] New: std.algorithm.find fails to take advantage of SortedRange

http://d.puremagic.com/issues/show_bug.cgi?id=8829

           Summary: std.algorithm.find fails to take advantage of
                    SortedRange
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: jmdavisProg gmx.com



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
predicate).

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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 15 2012