[Bug libstdc++/50160] New: vector<bool> comparison very slow (no specialisation)

devel@the-user.org gcc-bugzilla@gcc.gnu.org
Tue Aug 23 01:15:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50160

             Bug #: 50160
           Summary: vector<bool> comparison very slow (no specialisation)
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: devel@the-user.org


Hi!

Comparison (operator<) on vector<bool> seems to be extremely slow, because it
uses a generic implementation, i.e. bitwise iteration. It should be specialised
and use integer-comparisons provided by the CPU.

Regards



More information about the Gcc-bugs mailing list