lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 1 Jul 2015 17:07:40 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Chris Rorvick <chris@...vick.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH] un-improve strrchr()

On Wed, Jul 1, 2015 at 2:52 AM, Chris Rorvick <chris@...vick.com> wrote:
> [ resending w/o HTML formatting ]
>
> On Sun, Jun 28, 2015 at 11:44 AM, Alexey Dobriyan <adobriyan@...il.com> wrote:
>> Previous code did 1 branch per character + 1 branch for every character
>> in the last path component. Current code does 2 branches per characher
>> regardless.
>
> Shouldn't that be "+ 2 branches for every character in the last path
> component"?  The structure of the loop is basically the same; you're
> just performing fewer iterations if the character is found when
> searching from the end.

Yes, changelog is inaccurate.

It is "1 branch per character + 2 branches per character in
the last path component" vs "2 branches per character".

Rasmus posted benchmark (obvious rdtsc/strrchr/rdtsc) in private.

Speed highly depends on -O2/-Os setting and current mainline code
is not uniformly faster at least for me. I'll probably resend with new
and improved changelog.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ