Path: utzoo!utgpu!water!watmath!clyde!att!mtunx!rutgers!uwvax!oddjob!ncar!ames!amdahl!pyramid!voder!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.mac.programmer Subject: Re: BlockMove efficiency Message-ID: <11713@Apple.Apple.COM> Date: 7 Jun 88 05:32:13 GMT References: <7212@watdragon.waterloo.edu> <8796@dartvax.Dartmouth.EDU> Reply-To: dan@Apple.COM.UUCP (Dan Allen) Distribution: comp Organization: Apple Computer Inc, Cupertino, CA Lines: 28 >speed improvement. BlockMove uses "move.b" for all moves, and strings >a few of them together to gain a speed increase over a loop. If you >are moving WORDs (integers, shorts, what have you) then you can move >them much faster using "move.w" or "move.l". If you are moving >LONGINTs, then you can move them a lot faster on a Mac II if they are >aligned properly and you use "move.l." > >********************************************************************* >*Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755 * >********************************************************************* BlockMove was considerably enhanced in the MacPlus over the original Mac, and the new improved version has been present on all machines since the Mac Plus. The new improved BlockMove uses a MOVE.L loop when possible and for blocks of memory larger than 124 bytes will use a VERY FAST 12 register MOVEM.L instruction that is about as optimized as possible: result? _BlockMove is good for both general purpose and many specialized calls. In fact, MultiFinder even uses BlockMove to do its low memory context switching. You can't get much better. And what is neat is that it has different strategies depending on how much you are moving. Everyone ought to go out and call _BlockMove today! Dan Allen Software Explorer Apple Computer