Un-alignment in structures

Norman Diamond ndiamond at watdaisy.UUCP
Thu Apr 4 04:01:30 AEST 1985

> > Even on machines that "can't do" unaligned integers, this program
> > will probably run without "error" and will give some garbage for
> > output.
> Wrong.  On most machines that don't support unaligned integers, you
> will get a signal and a core dump.

I don't know which "most" is correct, but have used examples of both
kinds of machines.  The former are enough of a pain to be cause for a
lot of care.  (For that matter, so are the latter.)

> > ...After all, what does it gain a man
> > to save a millisecond of his computer's time if he loses an hour
> > of his own time thereby?
> Sometimes it saves his successor from spending many hours figuring out
> how to get that millisecond out.  Yes, Virginia, some programs do have
> to run fast, and few are the worse for a speed improvement.

If you have to remove one millisecond from a tight loop that has to run
in 50 milliseconds, you really should use assembly.


   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy at waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet at csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."

More information about the Comp.lang.c mailing list