Re: Slow byte manipulation on alpha stations ?

From: Paul E. Rockwell <rockwell_at_rch.dec.com>
Date: Thu, 20 Apr 95 10:32:19 -0400

On Thu, 20 Apr 95 14:51:57 +0200 wenger_at_simbad.u-strasbg.fr wrote:

>
>
> Is the conclusion correct that DEC alpha processors
> are not suited for manipulating bytes ?
>

"Not suited for manipulating bytes" is perhaps a bit too strong. "You might have
to do things a bit differently to get best performance" is probably more correct.

Unlike older RISC architectures, the Alpha architecture does not contain
byte load/store instructions. To access bytes, one must load a 32-bit or
64-bit data item and mask/shift.

Why is this?? Because byte load/store instructions are too complex to implement
in hardware and make them go fast, as well as having that performance be scalable.
One of Alpha's major design goals was simplicity and speed.

However, there are things you can do to make what you have go faster:

First, if you're moving or comparing strings, use the routines included in the
standard libraries instead of manipulating pointers. These routines are hand-optimized
for the Alpha.

Second, if you insist on doing these moves yourself, remember that the memory
units that the Alpha directly manipulates is 32 or 64-bits. If you can re-code your
example to make use of that information (by aligning your character string on one
of these "natural" hardware boundaries, and then doing the moves in 32 or 64 bit
chunks) you should performance improvements.

Also, I would not directly compare the sort, awk, and grep performances. These
utilities under Digital UNIX 3.0 and later have been XPG4 internationalized and can
deal with >8 bit character sets. This may cause a performance hit compared to older,
non internationalized versions.
 
--------
+---------------------------+tm Paul E. Rockwell
| | | | | | | | UNIX Sales Support Consultant
| d | i | g | i | t | a | l | Digital Equipment Corporation
| | | | | | | | 500 Enterprise Drive
+---------------------------+ Rocky Hill, CT 06067

Internet: rockwell_at_rch.dec.com Phone: (203)258-5022
Easynet: koodie::rockwell DTN: 320-5022
Received on Thu Apr 20 1995 - 10:40:51 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT