Benchmarks: AMD64 vs i386 on Dual 246 Opteron

Peter Wemm peter at wemm.org
Thu Jul 28 17:57:46 GMT 2005


On Thursday 28 July 2005 09:36 am, Steve Kargl wrote:

> As mentioned elsewhere, I would look for optimizations within
> the software packages that target i386.  Additionally, the
> instruction schedulers in gcc/gas have had many more years
> of development in comparison to the amd64 schedulers.

Take libc and libm for example...

libc:
peter at overcee[10:50am]~/fbp4/hammer/lib/libc-112> ls i386/string/
Makefile.inc    index.S         memset.S        strcpy.S        wcschr.S
bcmp.S          memchr.S        rindex.S        strlen.S        wcscmp.S
bcopy.S         memcmp.S        strcat.S        strncmp.S       wcslen.S
bzero.S         memcpy.S        strchr.S        strrchr.S       wmemchr.S
ffs.S           memmove.S       strcmp.S        swab.S
peter at overcee[10:50am]~/fbp4/hammer/lib/libc-113> ls amd64/string/
Makefile.inc    bzero.S         memmove.S       strcmp.S
bcmp.S          memcmp.S        memset.S        strcpy.S
bcopy.S         memcpy.S        strcat.S
peter at overcee[10:50am]~/fbp4/hammer/lib/libc-114>

libm:
peter at overcee[10:51am]~/fbp4/hammer/lib/msun-117> ls i387
Makefile.inc            s_ceilf.S               s_remquo.S
e_exp.S                 s_ceill.S               s_remquof.S
e_fmod.S                s_copysign.S            s_rint.S
e_log.S                 s_copysignf.S           s_rintf.S
e_log10.S               s_copysignl.S           s_scalbn.S
e_log10f.S              s_cos.S                 s_scalbnf.S
e_logf.S                s_finite.S              s_scalbnl.S
e_remainder.S           s_floor.S               s_significand.S
e_remainderf.S          s_floorf.S              s_significandf.S
e_scalb.S               s_floorl.S              s_sin.S
e_scalbf.S              s_llrint.S              s_tan.S
e_sqrt.S                s_llrintf.S             s_trunc.S
e_sqrtf.S               s_logb.S                s_truncf.S
fenv.c                  s_logbf.S               s_truncl.S
fenv.h                  s_lrint.S
s_ceil.S                s_lrintf.S
peter at overcee[10:51am]~/fbp4/hammer/lib/msun-118> ls amd64/
Makefile.inc    fenv.c          s_llrintf.S     s_remquo.S      s_scalbnf.S
e_sqrt.S        fenv.h          s_lrint.S       s_remquof.S     s_scalbnl.S
e_sqrtf.S       s_llrint.S      s_lrintf.S      s_scalbn.S
peter at overcee[10:51am]~/fbp4/hammer/lib/msun-119>  

Now granted gcc has many of these as builtins.. but it illustrates
the point I'm trying to make.  Lots of code has hand-tuned i386
assembler optimization and falls back to generic C code for 64 bit
mode.

Mysql could also easily be affected by inefficiencies in the amd64
pthread libraries too.

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


More information about the freebsd-amd64 mailing list