Message ID | 20230912044638.14504-1-kmatsui@gcc.gnu.org |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp174016vqx; Mon, 11 Sep 2023 21:48:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5hdg8lLHQPBJHSX4OHmx0APhWQ2wc50XhQk33twsXgffanKH9n9ZaulMTo3SNAL5+Gvep X-Received: by 2002:a17:906:295:b0:9a2:139:f469 with SMTP id 21-20020a170906029500b009a20139f469mr10173144ejf.69.1694494089288; Mon, 11 Sep 2023 21:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694494089; cv=none; d=google.com; s=arc-20160816; b=E00kYiT/UbI+DXwQDWEC61UiDhy0gB9PQM8Y0qUQznwBkWqg0bWQDPNSky6SzqpzTU M3l5eIQ68j8Hl9eG8icEr5t5Vw5Zxv2njE/6yGK4F8I5nzaJVMxEWVRKlDJwe6JiyG3H fm6LXADpMsquFHWR+J+RxwT0/rYO0aT6geXG25EvngESe8ouGDEjX/kctGJ+Q4OyTgMf Vs8qjDnRRU/1GCyfueiBnj/nAaK0R5lITQnY0Yyjcz86oBrkygvaB55VOYmt5avXFkN/ AsXWdqypANF060lid1PjpPztPcoVKHZVpsIFmpyffxzZvrdMbg6DgjQ9VZ5lKv6SjIuW LSuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=1MUtsr+E2MkOX92LAFxpW9BfWhOpLOYBbeiQujfe3o0=; fh=kSSy/oyUXqQD15FLeKdymIgDBFPFITPA1Gj52CNOxRQ=; b=zdirTsHLsBpohfosNetpNqkohJkdi6AV4ff+DTTAj3N48BgGOQck+CXCd6ZGkY7UQx 8VqHVcpGztQXhaGM/M9W0unH7utWM++OmiBkUb2gS8Dyk1GkdflzTPqFAp5uUz6eswFN jUYri7WlxNCmYnCXrHwyj/jCJnTUR67t7NJk4jVB/HW+e62NnpQFfUhFRl0DZW03a+Qn vvDOK4wV52pfvTqfmY3ETx7dWWr2iUOIlr4JlsAGlPGlBWkYmR79Bde3aZoXkn8P18EC X6CZ1P7/fAArYaKZ4bLP37NHZUBIdXDOsAhVl2RNVPWkG6je9fQIHt3ANf53A0K7gggs Tsaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="Q6LWCh/R"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id mf5-20020a170906cb8500b0099b41f2c735si7248681ejb.921.2023.09.11.21.48.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 21:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="Q6LWCh/R"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C86E3857709 for <ouuuleilei@gmail.com>; Tue, 12 Sep 2023 04:47:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C86E3857709 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694494069; bh=1MUtsr+E2MkOX92LAFxpW9BfWhOpLOYBbeiQujfe3o0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Q6LWCh/RlKhCcLLAVqzqr8+PUn2LBwkDWkPly4gaNiz9tU+HKXdyFqaUsVwi1i1XK x2u9HxRsep2XXvMGCHH0BwAp71LomEYiCg0rF17hMT6fmbhUdKf9T6rXiPEjsimJxa IcxHjW/R51Y+i/R74zFQqC1PDaX1UA2QAz9RdtB4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00641c01.pphosted.com (mx0b-00641c01.pphosted.com [205.220.177.146]) by sourceware.org (Postfix) with ESMTPS id 835723858D3C; Tue, 12 Sep 2023 04:47:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 835723858D3C Received: from pps.filterd (m0247476.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38C4YLng007607; Tue, 12 Sep 2023 04:47:05 GMT Received: from mxout23.cac.washington.edu (mxout23.cac.washington.edu [140.142.32.140]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3t2agfjbd0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 04:47:04 +0000 Received: from smtp.washington.edu (smtp.washington.edu [128.208.60.54]) by mxout23.cac.washington.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 38C4keb7007192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Sep 2023 21:46:40 -0700 X-Auth-Received: from localhost.localdomain ([10.154.74.234]) (authenticated authid=kmatsui) by smtp.washington.edu (8.16.1+UW21.10/8.14.4+UW19.10) with ESMTPSA id 38C4kdoo008138 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 11 Sep 2023 21:46:40 -0700 X-UW-Orig-Sender: kmatsui@smtp.washington.edu To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Ken Matsui <kmatsui@gcc.gnu.org> Subject: [PATCH 0/2] Optimize is_member_pointer trait performance Date: Mon, 11 Sep 2023 21:26:17 -0700 Message-ID: <20230912044638.14504-1-kmatsui@gcc.gnu.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: OjpkCuGNXSCMBME8z0c2NXGbZSiVg1nI X-Proofpoint-ORIG-GUID: OjpkCuGNXSCMBME8z0c2NXGbZSiVg1nI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_01,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=4 mlxscore=4 spamscore=4 adultscore=0 malwarescore=0 clxscore=1034 lowpriorityscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 impostorscore=0 mlxlogscore=143 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309120038 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Ken Matsui via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Ken Matsui <kmatsui@gcc.gnu.org> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776805834626698898 X-GMAIL-MSGID: 1776805834626698898 |
Series |
Optimize is_member_pointer trait performance
|
|
Message
Ken Matsui
Sept. 12, 2023, 4:26 a.m. UTC
This patch series optimizes is_member_pointer trait performance. The first patch implements __is_member_pointer built-in trait. The second patch optimizes is_member_pointer trait performance by using __is_member_pointer built-in trait if available. The performance improvement is shown in the following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_member_pointer_v.md#mon-sep-11-092927-pm-pdt-2023 Time: -47.2037% +/- 2.12936% Peak Memory Usage: -39.4183% +/- 0.00217276% Total Memory Usage: -41.9905% +/- 0% Ken Matsui (2): c++: Implement __is_member_pointer built-in trait libstdc++: Optimize is_member_pointer trait performance gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 4 +++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 ++ gcc/testsuite/g++.dg/ext/is_member_pointer.C | 30 ++++++++++++++++++++ libstdc++-v3/include/std/type_traits | 16 ++++++++++- 6 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/ext/is_member_pointer.C