Asm code runs slower with -O

Mihnea Balta dark_lkml@mymail.ro
Mon Jan 20 17:47:00 GMT 2003


Hello, 

  I'm attaching a source file which contains two checksum routines, one 
written in asm and the other in plain C.
  If I compile with -O or -O2, the program runs about 1.3-1.5 times SLOWER 
than with no optimizations. My compiler is gcc-2.95.3 and my test machine is 
an AMD Athlon @ 1145 Mhz.
  Please bear with me if there's something wrong with my asm routine, since 
I'm just beginning to learn how gcc inline asm works.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_udp_csum.c
Type: text/x-csrc
Size: 2564 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030120/4da3fa6f/attachment.bin>


More information about the Gcc-help mailing list