Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: Aligining bitmaps? Message-ID: <15291@dartvax.Dartmouth.EDU> Date: 29 Aug 89 06:10:39 GMT References: <3791@ncsuvx.ncsu.edu> <15288@dartvax.Dartmouth.EDU> <3967@internal.Apple.COM> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 28 In article <3967@internal.Apple.COM> lsr@Apple.COM (Larry Rosenstein) writes: >In article <15288@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu >(Earle R. Horton) writes: ... >Finally, I'm not sure that a word boundary is optimal alignment for Color >Quickdraw. I think you might want to use longword alignment. I haven't >done any stuff with offscreen pixmaps, so I don't know for sure. ... >> I don't notice any difference between aligned or non-aligned >> BitMaps with a black and white screen. On the other hand, these are >> subjective results since I haven't done formal timing. > >On a MacPlus it is noticeable, although I haven't done any formal >measurements, either. OK, I broke out the old Timex, and actually timed some big screen animation on the Mac II using 1, 2, and 4 bits screen depth with big offscreen PixMaps. My conclusion after about a half hour of testing was that the only alignment that makes any difference to Color QuickDraw CopyBits() is longword alignment. The performance increase when both PixMaps are longword-aligned is what I would call spectacular, too. It's about 2 to 1! There does appear to be little, if any, performance increase for byte or word alignment over random alignment, so I wasn't totally wrong before. Sorry for any confusion my earlier posting might have caused. Earle R. Horton