word alignment for structures in UNIX
Michael Meissner
meissner at osf.org
Thu Sep 27 05:50:46 AEST 1990
In article <4711 at navy19.UUCP> benyukhi at motcid.UUCP (Ed Benyukhis)
writes:
| ..... However, different COMPILERS for the SAME machine may have different
| alignment policies. Each compiler chooses an alignment policy based on the trade off
| of space efficiency vs. run-time efficiency.
Or depending on the phase of the moon, or whether the compiler writer
wanted to be compatible with something else, or what have you. For
example, you might chose to make things more strictly aligned then
necessary on the hunch that the next generation of chips will run
faster if strict alignment is used. For example, I believe that on a
8088 which has an 8 bit bus, a 16-bit item will take the same number
of cycles no matter what the alignment, but consider a 8086 which has
a 16 bit bus, aligning 16 bit items on 16 bit boundaries will go
faster I believe. Note I'm hedging in the example, because I do not
use intel chips in normal use, so I'm not as familar with them....
--
Michael Meissner email: meissner at osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
Do apple growers tell their kids money doesn't grow on bushes?
More information about the Comp.unix.internals
mailing list