From patchwork Tue Feb 21 04:06:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajalakshmi Srinivasaraghavan X-Patchwork-Id: 730284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vS6RS6q3Wz9s65 for ; Tue, 21 Feb 2017 15:08:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="dGOx+JXy"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=iVN1C75R6q4L554U93BNkojUCrIc7CtYg7PLnl1E0PV13VHaDlIT0 qOGAEWGqrr/x1SZ4/wH9mua7dIM5Oo87jCHeRyaWWGE/t81Tnodhe2zGOiz3itj0 LgSn0Wk2gD9WipRXBX2jgd209726cDr3uZsly0xS93q1beqbfkmQpQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=dJssKlqPmwBaAw5pZzbgkhLFnSM=; b=dGOx+JXyPgGgZgJ+xP9/SyLPKEw7 bF8XnPsb/SyKxGY58a5Bm63tbGXMNa5XK1atncITnaQrxLr56DC5lOaBpbaotvaP RXl9NWz+sla9H6pkA80FR6dOtAamrvx2o1HJTPE28o3oQCrhzRyfv5A1olc3ABzu syhlzrZwD80G/3A= Received: (qmail 4185 invoked by alias); 21 Feb 2017 04:07:55 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 3618 invoked by uid 89); 21 Feb 2017 04:07:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Increase X-HELO: mx0a-001b2d01.pphosted.com From: Rajalakshmi Srinivasaraghavan To: libc-alpha@sourceware.org Cc: Rajalakshmi Srinivasaraghavan Subject: [PATCH] Benchtests: Add tests to cover longer string for strrchr Date: Tue, 21 Feb 2017 09:36:17 +0530 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022104-0040-0000-0000-000002F1E3A0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022104-0041-0000-0000-00000C47D00A Message-Id: <1487649977-30920-1-git-send-email-raji@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-21_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702210040 While working on strrchr optimization for power8, found that the existing benchtests is not enough to find the improvements for longer strings. Hence increasing the length to 512 to measure the performance for a wide range. 2017-02-21 Rajalakshmi Srinivasaraghavan * benchtests/bench-strrchr.c (test_main): Increase the iteration to cover longer string. --- benchtests/bench-strrchr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchtests/bench-strrchr.c b/benchtests/bench-strrchr.c index 8af363a..3ea8200 100644 --- a/benchtests/bench-strrchr.c +++ b/benchtests/bench-strrchr.c @@ -154,7 +154,7 @@ test_main (void) do_test (i, 64, 256, 23, BIG_CHAR); } - for (i = 0; i < 32; ++i) + for (i = 0; i < 512; ++i) { do_test (0, i, i + 1, 23, SMALL_CHAR); do_test (0, i, i + 1, 23, BIG_CHAR); @@ -172,7 +172,7 @@ test_main (void) do_test (i, 64, 256, 0, BIG_CHAR); } - for (i = 0; i < 32; ++i) + for (i = 0; i < 512; ++i) { do_test (0, i, i + 1, 0, SMALL_CHAR); do_test (0, i, i + 1, 0, BIG_CHAR);