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 S X-Patchwork-Id: 19319 X-Patchwork-Delegate: siddhesh@gotplt.org 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);