Un-alignment in structures

zben at umd5.UUCP zben at umd5.UUCP
Mon Apr 8 20:36:51 AEST 1985

> In article <120 at mit-athena.UUCP> jc at mit-athena.UUCP (John Chambers) writes:
>                       ...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?

First off, lets make the sort of rash assumption that the machine time and
the human time cost the same.  Machine time has traditionally been much more
expensive than human time (I sure as h*ll don't get $300 an hour) but recent
history has machine costs dropping like crazy and it simplifies the analysis.

Now, the question you have to ask is: "Will this code be executed more than
60 * 60 * 1000 times over the lifetime of this program?".  If it will, then
it is surely worth your hour of time to tighten it up.  If it will not, then
why bother...

I see the point as being: "why cruftify the source program to do structure
access manually (to program around alignment issues) when you could have the
compiler do it automatically, error free :-), and leave the source code in a
state that a mere mortal can read, understand, and modify..."

Ben Cranston  ...{seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben  zben at umd2.ARPA

More information about the Comp.lang.c mailing list