My question concerned particular slowness noticed on alpha processors in
byte manipulation applications.
Thank you to all people who took time to answer my question:
cherkus_at_unimaster.com
rockwell_at_rch.dec.com
alan_at_nabeth.cxo.dec.com
iglesias_at_draco.acs.uci.edu
gadbois_at_mcc.com
reeves_at_zk3.dec.com
intrepid!tb_at_uunet.uu.net
rjackson_at_gmu.edu
kpe_at_ne.dk
henning_at_i4get.enet.dec.com
The slowness of DEC alpha in handling bytes is known and documented
in the architecture manuals. Also articles published in the
Communications of the ACM (no precise issue given) explain the
processor design and the tradeoffs made.
The alpha processor has no direct byte manipulation instructions and
needs to load a word and extract a byte to get it, load a word,
mask a byte, insert it and store the word to write a byte to the memory.
Concerning the example I gave (writing a loop to copy bytes):
...
for (p1=str1, p2=str2; p1 < pf; ) *p1++ = *p2++;
several people pointed out that this was the wrong way of doing it. Execution
times are much better if this loop is replaced by a standard C library function
like memcpy(), bcopy() or strcpy().
==> Comment: that's of course true, but I used only this loop to highlight
the probleme, not to claim that a string copy is slow.
In a lot of applications, you often manipulate one byte
after the other and cannot only use such functions on large
areas of data.
The very slow execution time found with grep, awk and sort, especially
compared to DEC 5400 was explained by the fact that under OSF/1, these
utilities are XPG4 internationalized and can deal with characters sets larger
than 8 bits.
==> Comment: May be, but the price for this internationalization seems
to be VERY high. And this explanation is not suffisant: all
byte oriented applications, like latex, ghostscript, perl,
gawk (not internationalized) perform slower on DEC alpha
than it could be expected.
Local Digital sales-persons said that the next generation of alpha processor
will improve byte management.
At last, a very interesting report was sent to me by John Henning, from
DEC, CSD Performance Group. I just attached it at the end of this mail.
It may contain interesting and useful informations for many people.
Marc Wenger
wenger_at_astro.u-strasbg.fr
============================================================================
Received on Wed Apr 26 1995 - 05:30:16 NZST