🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2064

Re: Aggressive optimization

#2064
From: Jim Giles
Date: Wed, 14 Nov 1990 21:38
15 lines
1121 bytes
From article <2732@l.cc.purdue.edu>, by cik@l.cc.purdue.edu (Herman Rubin):
> [...]
> Well, here is an example which will definitely not work on all machines.
> It is desired to move 3 bytes into the three least significant bytes of
> a 4-byte word (other sizes are appropriate), and repeat this operation.
> This can be done efficiently by using pointers to words on a machine with
> unaligned reads.  Even with overhead for unaligned reads, it is hard to
> see how to do this efficiently otherwise.

It's hard to see what this has to do with the array vs. pointer
issue which was being discussed.  It looks to me like you've got
a word that's being 'mapped' as an array of bytes and your loop
is filling the bottom three bytes.  Where are the pointers?

J. Giles
Technical Details
Message-ID: <5961@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!jlg
References: <2732@l.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.misc
Subject: Re: Aggressive optimization
Message-ID: <5961@lanl.gov>
Date: 14 Nov 90 21:38:53 GMT
References: <2732@l.cc.purdue.edu>
Organization: Los Alamos Natl Lab, Los Alamos, N.M.
Lines: 15