pointer alignment on a Vax 780

Stew Rubenstein stew at harvard.ARPA
Wed Jun 26 16:04:42 AEST 1985


> Are there any alignment constraints on the Vax 780?
> Could one, for example, set an integer pointer to
> the middle of a machine word? 
> 
> If there aren't alignment constraints, is it faster
> to compare two word-aligned integers?

There are no constraints, but there is definitely a speed penalty for
fetching non-aligned data.  longwords should be aligned on longword
boundaries, quadwords on quadwords, etc., for best performance.  I have
even heard of differences in benchmark timing based on the alignment
of the instruction stream, though this is harder to predict and control.



More information about the Comp.lang.c mailing list