Red Hat Bugzilla – Bug 185341
ASM code provides no benefit over C on P4 machine
Last modified: 2007-11-30 17:11:27 EST
Description of problem:
Not a problem, just a note to the Red Hat developers: the ASM modules which are
used by default in an x86 build provide no performance benefit. GCC v4.0.2
compiles the C code into object modules whose performance is roughly that of the
2 *.S files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build binary Zip program from SRPM
2. Time the use of the binary with some large compression job
3. Edit unix/configure to remove the enabling of the ASM code
4. Rebuild Zip using only C source files and the standard FC4 build flags.
5. Note that the elapsed time to do the large Zip job is roughly the same
whether using the ASM code of not.
Equivivent performance with and without ASM code.
Expected hand-tuned ASM to be faster.
I did the testing on a uP Pentium4 machine running a fully-updated FC4.
Probably that ASM code was faster on earlier processors, compared with earlier
versions of GCC, but it's not now. It may be that the new GCC 4.1 code
generation improvements make that ASM code a liability, not just unneeded as is
the case with GCC v4.0.2.
This problem should be discussed with zip upstream maintainers -
http://www.info-zip.org/pub/infozip/Zip.html. Please report this to upstream.