Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.unix.internals Subject: Re: word alignment for structures in UNIX Message-ID: Date: 26 Sep 90 19:50:46 GMT References: <5020@quiche.cs.mcgill.ca> <4711@navy19.UUCP> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 23 In-reply-to: benyukhi@motcid.UUCP's message of 25 Sep 90 13:48:49 GMT In article <4711@navy19.UUCP> benyukhi@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@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?