From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by sourceware.org (Postfix) with ESMTPS id 0F62F3858D20 for ; Mon, 20 Mar 2023 09:56:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F62F3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-vs1-xe2c.google.com with SMTP id cz11so3523653vsb.6 for ; Mon, 20 Mar 2023 02:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1679306207; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ElYT+KrS4N7zgmaGGGwc+cAKFhWcV/KAEMDOMBYzNDk=; b=I89DfAe/SGVHUtbYzOtK1hj0aUVIDBeI9RLwzb/H88m960isf6YH0wpUddavMzEwdc p8TLRd28bKKWWpyTha0CqaxZMEp/iVX26JSuI0TGQ2Pekq62KuFGRMLSbGEzqLlFZ7eC xkjOhTmt6HTHwunkrjsiQhWAUxTo+9Kd8h/yM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679306207; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ElYT+KrS4N7zgmaGGGwc+cAKFhWcV/KAEMDOMBYzNDk=; b=NuF+rzt1bEqEyKzvGXH5W/aQSPch02FgV8cQ0TdnRLlEZsEIyrdR5do8Yu6eUEaoF7 pJErEARvLZc9ISlIBB/hW4QgMCx27A8Ed+Fy12OZiJC6vo1ZnEzDUFJq6yl/RU952Zs8 5bCYCCYCPFKPcpd7JUrMz1rxejka22gVmjPzDPRvvyOHFZHo7nnbdnYjooc2DY+HHBqK mnxe3SdXWpHOyM43e2NHvibyJV5xD2x0QVv3uRtpoAT7WxISGvK0tOIiRoAJd7kh6yhA 88Z6kr1RAsJGIhJKNaJFZJ09tGi0Poyd6fGyG8cNKEe5w1Uy9DBBjZ9QxEvu92jRYNZp 1vXw== X-Gm-Message-State: AO0yUKWG3QPlmWocyElQyxZW8xaZ/k9q5JWdS0FIWEptO1PaQPXjtRbh Rg6xeJ2DAJoEDaQ6kfcZjqsbuuc7EXYaiKxHE9E3Xw== X-Google-Smtp-Source: AK7set/QbqXdxjyWs4izXdNPwCqA5lR0SpCMbmDy8/wq+KhlLXKKXNEtMRD+YE7ZCXUpz4tzl2bG7UNJ+MH9ZJSHeKc= X-Received: by 2002:a67:c00f:0:b0:415:74b4:6067 with SMTP id v15-20020a67c00f000000b0041574b46067mr3481252vsi.6.1679306207303; Mon, 20 Mar 2023 02:56:47 -0700 (PDT) MIME-Version: 1.0 References: <45e80ead7387ef50026922c217a33719bfc66a4a.camel@xry111.site> <830648d9293be2e7895e0b40ccac9cce16858aa3.camel@xry111.site> In-Reply-To: From: Ken Matsui Date: Mon, 20 Mar 2023 02:56:36 -0700 Message-ID: Subject: Re: [PATCH] libstdc++: use new built-in trait __is_reference To: Jonathan Wakely Cc: Xi Ruoyao , gcc-patches@gcc.gnu.org, Patrick Palka , libstdc++@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Does it actually make compilation faster though? > > Has it been measured? In my understanding, what I have implemented so far is so simple that it does not affect the speed. These traits are what Partick kindly recommended to get started. As explained on the GSoC page, some traits might involve expensive instantiation of multiple class templates. So IMHO, implementing built-in traits for those traits can make compilation cheaper. I have not measured it, but Patrick might have done? On Mon, Mar 20, 2023 at 2:14=E2=80=AFAM Jonathan Wakely wrote: > > On Mon, 20 Mar 2023 at 08:08, Xi Ruoyao via Libstdc++ > wrote: > > > > On Mon, 2023-03-20 at 01:03 -0700, Ken Matsui wrote: > > > Oops, I assumed those were my email... Thank you for your heads up an= d > > > your comments! > > > > > > > Bad ChangeLog format. You should have a tab (not 4 or 8 spaces, no= r > > > > nothing) to indent the ChangeLog content. > > > > > > Do you mean like the following? > > > > > > ``` > > > libstdc++-v3/ChangeLog: > > > > > > [TAB]* include/std/type_traits (is_reference): Use __is_reference > > > built-in > > > trait. > > > ``` > > > > Yep. > > > > > > Is there any benefit to use a builtin, instead of the existing > > > > implementation? I can see no but maybe I'm stupid. > > > > > > My patches are based on the GSoC project "C++: Implement compiler > > > built-in traits for the standard library traits". These built-in > > > traits basically make the compilation faster. > > > > > > https://gcc.gnu.org/wiki/SummerOfCode > > > > Ok, to me making compilation faster is a valid reason. > > Does it actually make compilation faster though? > > Has it been measured? > > > > > The patch fails to apply. It seems because your mail client insert= ed an > > > > additional newline before "b/". Try to use git-send-email or confi= gure > > > > the mail client properly. > > > > > > Let me try to use git-send-email instead. I stupidly don't understand > > > how to use them, so I was making my patches manually... > > > > Or adjust the mail client correctly. You can send the patch to yoursel= f > > first and see if it's not "mangled" by the mail client when you debug > > such an issue... > > > > But when you finally end up sending 10 patches in a series you'll find > > git send-email much easier :). > > Figuring out how to generate proper patches is an important part of > contributing to GCC, so part of any GSoC project.