From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3A0E385663B; Thu, 8 Jun 2023 10:22:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3A0E385663B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686219769; bh=R+7KAdoc6BxyMqFb90RlLcJvzBcg/U5gaQo4+XijIuY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OdW1TSN1E2DHcNLqdbtEUmWobHG88glydfW5ZZWlrKESl9h997nPoy4z8GYm/xYCk xH10mxPpZbMdG7Bv4+inABmNutbp3ssMtQ1Z5rRPogJh2/BZpjWV7FqmfA2qRrLj6C 7sIJHyMS5je2ygoVf2urlBXhkGGIBVhrFTXgNUKc= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110167] excessive compile time when optimizing std::to_array Date: Thu, 08 Jun 2023 10:22:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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=3D110167 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > The "obvious" alternative impl using a lambda expression is even slower: Actually for GCC 13 it's faster: $ time ~/gcc/13/bin/g++ 110167.cc -c -O3=20 real 0m9.422s user 0m9.232s sys 0m0.170s $ time ~/gcc/13/bin/g++ 110167.cc -c -O3 -DUSE_LAMBDA real 0m6.403s user 0m6.342s sys 0m0.048s So that's nice.=