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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Dec 2010 23:12:08 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Nick Piggin <npiggin@...nel.dk>
Cc:	Américo Wang <xiyou.wangcong@...il.com>,
	Nick Piggin <npiggin@...il.com>,
	"J. R. Okajima" <hooanon05@...oo.co.jp>,
	linux-arch@...r.kernel.org, x86@...nel.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: Big git diff speedup by avoiding x86 "fast string" memcmp

On Tue, Dec 14, 2010 at 9:54 PM, Nick Piggin <npiggin@...nel.dk> wrote:
>
> That's what I would like to know, but I suspect that for very short
> strings we are dealing with, the custom loop will be fine for
> everybody.

Yeah, I can pretty much guarantee it for the common case of short
strings. Most path components are short enough that a "clever"
memcmp() is simply likely going to be slower than doing things
byte-per-byte.

That's especially true if we then in the future end up making it do a
long-by-long compare instead of the byte-by-byte one.

                        Linus
--
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