This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43052] Inline memcmp is *much* slower than glibc's
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 5 Jul 2011 11:10:19 +0000
- Subject: [Bug target/43052] Inline memcmp is *much* slower than glibc's
- Auto-submitted: auto-generated
- References: <bug-43052-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
--- Comment #15 from Jan Hubicka <hubicka at ucw dot cz> 2011-07-05 11:08:50 UTC ---
>
> Do you think you could spin a script which also tests memcmp?
memcmp is different story. Few years back I rewrote memcpy/memset codegen to
allow choosing
from several basic implementations based on size. The script I attached is
basically
testing the individual algorithm so you can set for each CPU target a table
choosing best
performing one for given size.
memcmp is still produced in very stupid way. Sane inline implementations of
memcmp are harder than memcpy/memset. I will try to look into it and how
current recommended codegens look for AMD/Intel chips.
Honza