From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075319106546.tru64-unix-managers.marc@archive.invalid> From: "Paul E. Rockwell" Date: Thu, 20 Apr 1995 14:32:19 +0000 To: tru64-unix-managers Subject: Re: Slow byte manipulation on alpha stations ? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075319106546 On Thu, 20 Apr 95 14:51:57 +0200 wenger@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@rch.dec.com Phone: (203)258-5022 Easynet: koodie::rockwell DTN: 320-5022