This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] remove unnecessary memset in strcoll


On Thu, Jun 18, 2015 at 01:41:32PM +0200, Leonhard Holz wrote:
> This patch avoids some initialization overhead in the hot path of strcoll by
> replacing a memset with zero assignments. It improves the file listing benchmark
> by 15% on x86. Tests are ok.
> 
> filelist#C		-1.30%
> filelist#en_US.UTF-8	-15.08%
> lorem_ipsum#vi_VN.UTF-8	-15.04%
> lorem_ipsum#ar_SA.UTF-8	-11.83%
> lorem_ipsum#en_US.UTF-8	-9.66%
> lorem_ipsum#zh_CN.UTF-8	-8.63%
> lorem_ipsum#cs_CZ.UTF-8	-8.28%
> lorem_ipsum#en_GB.UTF-8	-18.07%
> lorem_ipsum#da_DK.UTF-8	-11.13%
> lorem_ipsum#pl_PL.UTF-8	-15.31%
> lorem_ipsum#fr_FR.UTF-8	-12.26%
> lorem_ipsum#pt_PT.UTF-8	-10.64%
> lorem_ipsum#el_GR.UTF-8	-8.19%
> lorem_ipsum#ru_RU.UTF-8	-0.65%
> lorem_ipsum#iw_IL.UTF-8	-14.92%
> lorem_ipsum#es_ES.UTF-8	-11.47%
> lorem_ipsum#hi_IN.UTF-8	-1.05%
> lorem_ipsum#sv_SE.UTF-8	 6.44%
> lorem_ipsum#hu_HU.UTF-8	-9.85%
> lorem_ipsum#tr_TR.UTF-8	-14.96%
> lorem_ipsum#is_IS.UTF-8	-10.35%
> lorem_ipsum#it_IT.UTF-8	-11.33%
> lorem_ipsum#sr_RS.UTF-8	-9.88%
> lorem_ipsum#ja_JP.UTF-8	-3.23%
> 
> 
> 	* string/strcoll_l.c (STRCOLL): Remove unnecessary memset.

The patch did not apply cleanly, probably because your mail client
tampered with the patch content before sending.  I've fixed it up and
committed it since the change is trivial, but please make sure you use
something better like git-am to post patches in future.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]