From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D0A133858408; Wed, 7 Feb 2024 12:34:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0A133858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707309246; bh=NpG08MmM7k5DmpG8cMce9etNcQnvNtfflSpVB7Tx/Sw=; h=From:To:Subject:Date:From; b=Uyu52rHfTPupGGZYQIuWm3lgs6ty2QHF6VYY3yXc/ByZWo6iw0nA3RWdaCa4x/eV7 I4g1jKOjp4LiBEShk20CBA/UyJX7U/Ht8Tr+E3y1p67dMrdSVMkFmagRj1tFBzHSkA qWWHab0iLLoEX2QVb3KsaUTmlpi0SrFPZJJdic7c= From: "rhalbersma at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113807] New: [performance] bitset::set not using memset opportunity Date: Wed, 07 Feb 2024 12:34:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rhalbersma at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113807 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 delegat= e to __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)) and uses a loop otherwise. = In contrast, bitset::set unconditionally has a raw loop.=20 Can't bitset::set also not similarly use __builtin_memset(_M_w, 0xFF, _Nw * sizeof(_WordT)); when is_constant_evaluated() is false?=