Subject: gcc de-optimisations
To: None <tech-toolchain@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-toolchain
Date: 10/23/2005 20:24:27
How do we stop gcc (i386) converting:
if (memcmp(a, b, 16))
into:
movl %ecx, #16
repeq cmpsb
Since any moderm x86 processor takes more cycles getting a repeated
string operation started than I've had hot dinners recently...
It is probably faster to call a C compare function than to use the
inlined code that gcc generates. Certainly I sped up (a hacked version of)
the dynamic linker that way.
David
--
David Laight: david@l8s.co.uk