Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!spam!ross From: ross@spam.ua.oz.au (Ross Williams) Newsgroups: comp.compression Subject: Re: Fast 68000 copy routine. Summary: Re: Fast 68000 copy routine. Keywords: fast 68000 block memory move copy routine reinventing the wheel Message-ID: <854@spam.ua.oz> Date: 19 Jun 91 01:20:09 GMT Sender: ross@spam.ua.oz Organization: Statistics, Pure & Applied Mathematics, University of Adelaide Lines: 32 >In article <845@spam.ua.oz> ross@spam.ua.oz.au (Ross Williams) writes: >>Compressor heads who are using the 68000 version of LZRW1 or who want >>a 68000 fast memory block copy (using unrolled loops and so forth) may >>be interested in my fast block memory routine written in 68000 machine code. > >Isn't this called "re-inventing the wheel"? Yes - sorry. >How is your code better than the other 97 implementations of >"fast block copy"? It's been about 10 years since the idea of >using MOVEM.L in an unrolled loop was invented; have you compared >your implementation to the standard routines? No I haven't. Worse still, I didn't spot the MOVEM.L instruction! I just used MOVE.L/.W/.B in an unrolled loop!! I calculate that mine will be approximately 13% slower than one that uses a MOVEM.L. However, my algorithm will quickly move non-relatively-word-aligned blocks if that is any help! The main reason that I posted the code was that it is an important part of the 68000 assembler implementation of my LZRW1 algorithm. Those using the algorithm up to now have had to find their own copy routine. Now there is an "official" one for the algorithm. The reason that I wrote the code in the first place was because the movmem routine in my Macintosh Lightspeed C compiler's library was slow. I assumed that if fast routines were commonplace then the library of this fairly mainstream compiler would have used one. Ross Williams ross@spam.ua.oz.au