From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id 102853858002; Mon, 7 Aug 2023 17:51:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 102853858002 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKP5k30w7z9sWr; Mon, 7 Aug 2023 19:51:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1691430714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sis5DIJvJY+bwgL7rXd0MrtIp3MTqlNjX/A9+ZGccVc=; b=KmQeDpkBdKqK6fwIvvQuTVZhuFGp7xHc0iwyw5UC4YZWBNQAEkPIGeWWHyHJoYQoIodpW3 76z71wL+y9khk4f6OavxAGNF+3kE7vA8Wo+F0hsYOlsSxUipx6v8ge0LvQVzqvRx3SByx0 LqG1xrfo3ScQ5bQJf+HkQ55MkGF9safWFZ/7Y9crT1vxIcnmUvMyBGcmUyK6VOcMwPZEi/ Fq4PsmS6DWU49/GB4P/9Nim+pndjokg8gOIrlCBDVVbiKU8T1oH72mwG4BgtLlhj3JUJYD S5roswgmA50EM5PKavIKncd179dcqPQJaTZTQ4RpDlmpHkcEfKjxS6e+EURLUQ== References: <20230429101640.1697750-1-arsen@aarsen.me> <20230429101640.1697750-3-arsen@aarsen.me> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH 2/2] libstdc++: Replace all manual FTM definitions and use Date: Mon, 07 Aug 2023 19:38:03 +0200 In-reply-to: Message-ID: <86v8dqu4ef.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jonathan Wakely writes: > On Sat, 29 Apr 2023 at 11:24, Arsen Arsenovi=C4=87 via Libstdc++ < > libstdc++@gcc.gnu.org> wrote: > >> libstdc++-v3/ChangeLog: >> >> * libsupc++/typeinfo: Switch to bits/version.h for >> __cpp_lib_constexpr_typeinfo. >> >> > Does this change have an impact on compilation speed? > With this change we'll be re-including bits/version.h multiple times in > most compilations, and unlike other headers the preprocessor can't optimi= ze > away the second and subsequent times its' included, because the header > isn't idempotent. > It will only affect the preprocessing phase, which is a fraction of the > time taken by template instantiation and middle end optimizations, but I'd > like to know it's not *too* expensive before committing to this approach. > Whoops, I forgot to provide these measurements. ~/gcc/build$ time for x in $(seq 1 100); do _pfx/bin/g++ -x c++ - \ -S -o /dev/null <<< '#include '; done =20=20 real 3m4.104s user 2m53.394s sys 0m10.132s ~/gcc/pristine-bld$ time for x in $(seq 1 100); do _pfx/bin/g++ \ -x c++ - -S -o /dev/null \ <<< '#include '; done =20=20 real 2m56.430s user 2m46.898s sys 0m8.967s The top is a build of gcc with (a rebase of) this patchset, and the bottom is the merge base. The configuration for both was: ../configure --enable-languages=3Dc++ \ --disable-libsanitizers \ --prefix=3D"$(pwd)/_pfx" This should imply that the difference is minor compared to compilation time. Of course, for preprocessing, the difference is far more significant (same testcase, but with -E): 0m17.248s vs 0m28.382s. This seems okay to me. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZNEvOF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTY0EBAMnPuS/ZZTFI81Do6a/7xEAN7R/qijB+lfkX 5D8OiY8PAQDjobo9E5meaROjxhMm2vrXtjDCm4iFG/yvZO6EYt/7DA== =ovOX -----END PGP SIGNATURE----- --=-=-=--