https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113807

            Bug ID: 113807
           Summary: [performance] bitset::set not using memset opportunity
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rhalbersma at gmail dot com
  Target Milestone: ---

Conditionally on is_constant_evaluated() being false, bitset::reset delegate to
__builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)) and uses a loop otherwise. In
contrast, bitset::set unconditionally has a raw loop. 

Can't bitset::set also not similarly use __builtin_memset(_M_w, 0xFF, _Nw *
sizeof(_WordT)); when is_constant_evaluated() is false?

Reply via email to