From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4C7551F670 for ; Fri, 22 Oct 2021 13:08:40 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 591D83857802 for ; Fri, 22 Oct 2021 13:08:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 591D83857802 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634908119; bh=dNXuNcNJpnoh6Tk/w/7wem+P8GJ7J4PCv3ZvGPoBvP8=; h=In-Reply-To:References:Subject:To:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Rp+Dlyn2cF7NLwGjC6dyiwAqKpDEqSQJOphxfIzt2TnEvaI1+4H+T5m2zAtrO5X+5 qonuwF2Y3mBfSZSMKfGIecIKUGNYR4AAXaNGuQFz8oo+Jk3MMGYeG+ZxwhebXLtP6o uJC8EGWvdm+i/rDGVtkRM26uN0L1euuxB9nwxHI8= Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9BEE63858416 for ; Fri, 22 Oct 2021 13:08:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9BEE63858416 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19MD4UPC029729; Fri, 22 Oct 2021 09:08:11 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bua9hr6n8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Oct 2021 09:08:11 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19MBomOg014259; Fri, 22 Oct 2021 09:08:10 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bua9hr6mt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Oct 2021 09:08:10 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19MD49gT018839; Fri, 22 Oct 2021 13:08:10 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma02dal.us.ibm.com with ESMTP id 3bqpce0xma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Oct 2021 13:08:09 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19MD88Dh19071374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Oct 2021 13:08:08 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 799E978070; Fri, 22 Oct 2021 13:08:08 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B7B87806E; Fri, 22 Oct 2021 13:08:07 +0000 (GMT) Received: from localhost (unknown [9.160.187.233]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 22 Oct 2021 13:08:07 +0000 (GMT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20210805074733.433430-1-naohirot@fujitsu.com> <163456183281.2142698.11944761470468149892@localhost.localdomain> <163474414241.24618.5298374761029169472@localhost.localdomain> Subject: Re: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest To: Wilco Dijkstra , libc-alpha@sourceware.org, naohirot@fujitsu.com Date: Fri, 22 Oct 2021 10:08:06 -0300 Message-ID: <163490808634.842608.12221667700488100955@localhost.localdomain> User-Agent: alot/0.9.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: sZ_97YNZ6zmhAtm9eIygfqQ6vFQLqRZr X-Proofpoint-ORIG-GUID: b-a753OfyWrvn0tgkI6BNYMMjpG2t3fo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-22_04,2021-10-22_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=860 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110220074 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Lucas A. M. Magalhaes via Libc-alpha" Reply-To: "Lucas A. M. Magalhaes" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Hi Wilco, Thanks for clarifying. > > Sorry but I suppose don't understood your suggestion completely.=C2=A0 = The > > memset_value array will hold patterns like [0,0], [0,1] or [1,1], > > right?=C2=A0 If so, this will not work to measure the zero-to-one patte= rn for > > example, as it will be mixing zero-to-one with one-to-zero calls. In > > order to measure just an specific patter the buffer must be loaded > > previously of the timing loop. >=20 > The original idea was to add more tests for memset of zero and check > whether writing zero is optimized and/or writing zero over zero. There is > an equal number of 0->1 and 1->0 transitions in a pattern, so you can't > easily differentiate between them, but you can tell whether they are the > same or faster than 1->1 transitions. >=20 > For 0->0 you can run different patterns with a varying number of transiti= ons > but the same number of zeroes and ones: eg. 0000000011111111 (7 times 0->= 0) > vs 0011001100110011 (4 times 0->0) vs 0101010101010101 (no 0->0). That's an interesting strategy, indeed. I guess that's a little more complex than most of the other benchmarks. I agree that this could solve the issues with variations for small lenghts. Thanks. --- Lucas A. M. Magalh=C3=A3es