pf@diab.UUCP (Per Fogelstrom) (09/02/87)
Some time ago i made some strange (well at least unexpected) discoveries. When i was working with the code generator for the C-compiler i just tried to remove the "align" instruction before every procedure start. Just to see how much improvement the align did. BUT !!!! Imagine my suprise when i found out that a "typical" program gained 1-3% in speed when the "align" instructions was removed. Can anyone give some anwers on that ?? -- Per Fogelstrom, Diab Data AB SNAIL: Box 2029, S-183 02 Taby, Sweden ANALOG: +46 8-7680660 UUCP: seismo!mcvax!enea!diab!pf
goldman@encore.UUCP (Steve Goldman) (09/04/87)
I have found in the past that the assembler we used did not align text properly. When the compilers skip the assembler and generate direct object code they do the alignment properly, alignment wins. Check your final code image to see if entry points are really aligned. I found that random variations in the alignment, caused by code template changes I was trying, were on the order of +/-3% and masked any improvement I was looking for. Things became very repeatable when alignment became stable.
srm@violet.berkeley.edu (Richard Mateosian) (09/14/87)
>A "typical" program gained 1-3% in speed when the "align" instructions >was removed. Can anyone give some anwers on that ?? You no longer had to waste time executing the NOPs that aligning requires. For a 32016 this should account for the improvement. For a 32032 the explanation might be trickier. Richard Mateosian 2919 Forest Avenue 415/540-7745 srm@violet.Berkeley.EDU Berkeley, CA 94705