lkml.org 
[lkml]   [1999]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Faster strlen
From
Date
"Alexander Maryanchick" <Sasha@GDev.msk.ru> writes:

|> Have you seen M$' CRT?
|> It sometimes worth to see.
|> Here is a critical piece of their 'strlen' code:
|>
|> mov eax,dword ptr [ecx] ; read 4 bytes
|> mov edx,7efefeffh
|> add edx,eax
|> xor eax,-1
|> xor eax,edx
|> add ecx,4
|> test eax,81010100h
|> je short main_loop
|> ; found zero byte in the loop

Which is not much different from the code in glibc.

|> On Pentiums this sadistic code is 4 times faster that our :-(.
|> Really, Gates has his von Braun.

This is common knowlege already for at least 8 years.

--
Andreas Schwab "And now for something
schwab@suse.de completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.028 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site