From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60118 invoked by alias); 25 May 2017 09:32:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 60095 invoked by uid 89); 25 May 2017 09:32:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH] benchtests: Add more tests for memrchr To: libc-alpha@sourceware.org References: <20170524154422.GA14778@lucon.org> From: Rajalakshmi Srinivasaraghavan Date: Thu, 25 May 2017 09:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170524154422.GA14778@lucon.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17052507-0004-0000-0000-000002073D47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17052507-0005-0000-0000-000009FCE5AA Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-25_07:,, 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-1703280000 definitions=main-1705250180 X-SW-Source: 2017-05/txt/msg00751.txt.bz2 On 05/24/2017 09:14 PM, H.J. Lu wrote: > FOR_EACH_IMPL (impl, 0) > do_one_test (impl, (CHAR *) (buf + align), seek_char, len, result); > @@ -143,11 +144,27 @@ test_main (void) > do_test (i, 64, 256, 23); > do_test (0, 16 << i, 2048, 0); > do_test (i, 64, 256, 0); > +#ifdef USE_AS_MEMRCHR > + /* Also test the position close to the beginning for memrchr. */ > + do_test (0, i, 256, 23); > + do_test (0, i, 256, 0); > + do_test (i, i, 256, 23); > + do_test (i, i, 256, 0); > +#endif > } > for (i = 1; i < 32; ++i) > { > do_test (0, i, i + 1, 23); > do_test (0, i, i + 1, 0); > + do_test (i, i, i + 1, 23); > + do_test (i, i, i + 1, 0); > +#ifdef USE_AS_MEMRCHR > + /* Also test the position close to the beginning for memrchr. */ > + do_test (0, 1, i + 1, 23); > + do_test (0, 2, i + 1, 0); > + do_test (i, i, i + 1, 23); > + do_test (i, i, i + 1, 0); The above two lines are repeating, instead of do_test (i, 1, i + 1, 23); do_test (i, 2, i + 1, 0); LGTM with the above change. > +#endif > } > > return ret; > -- 2.9.4 > -- Thanks Rajalakshmi S