Athlon memory speed asymmetry

David Mathog mathog at
Tue Feb 25 08:27:13 PST 2003

I'm observing an odd asymmetry in memory utilization on
Athlons.  Trivial array operations (read then write)
are up to 30% faster going up through the array then
down through the array.

This was true with both gcc and Intel C compilers
on Linux and with the Intel C compiler on Windows XP.  It
was true on Athlon 2000MP, 2200MP and 2000XP.  My one
Sparc machine gave symmetric memory speeds (to within a
percent or two). There is a known prefetch issue on
Athlon's but my understanding of that was that it affected
only self modifying code.  

I didn't go looking for this odd effect - it fell out
when benchmarking a combsort variant which swapped
directions on every pass - and anomolously ran
much slower than the original which only went up through

Here's a tiny example program (97 lines, mostly comments):

# gcc -O3 -o memasymmetry memasymmetry.c
# ( time ./memasymmetry 10000000 ) 2>&1 | grep real
real    0m0.188s
# ( time ./memasymmetry -10000000 ) 2>&1 | grep real
real    0m0.221s

AMD support has been contacted but has not got back to me on
this yet.

Anybody else seen this before?
Who knows what causes it?
Is there a way around it on these Athlons?


David Mathog
mathog at
Manager, Sequence Analysis Facility, Biology Division, Caltech

More information about the Beowulf mailing list