This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: rawmemchr


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Christopher Faylor on 5/20/2008 9:22 PM:
|
| Unless there's something I'm missing, cygwin should be using the assembly
| language routines in string.h.

True enough.  But look at machine/i386/strchr.S - it skips straight to L9
if the string is unaligned, rather than parsing the first few bytes and
benefiting from the aligned algorithm on the bulk of the search.  And in
the special case of the target byte of 0, it still wastes time creating a
second mask, and performing two tests instead of one inside the L10 loop.
~ The same principles should apply of providing rawmemchr in x86 assembly
to make strchr(p,0) behave almost twice as fast as it currently does.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgznUUACgkQ84KuGfSFAYCACQCgzCSdlQysyBBAyTeS7mMyNjNc
7CQAn1tNI6hoYvyKgXg57HPWO5KYTJRG
=K4gw
-----END PGP SIGNATURE-----


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