Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!vax1.tcd.ie!hughesmp From: hughesmp@vax1.tcd.ie Newsgroups: comp.sys.amiga.programmer Subject: Re: New life for MOVEM! Message-ID: <1991Mar2.042511.7894@vax1.tcd.ie> Date: 2 Mar 91 04:25:11 GMT References: <1991Feb11.160212.7749@vax1.tcd.ie> Lines: 36 In article , dej@qpoint.amiga.ocunix.on.ca (David Jones) writes: >>In article <1991Feb11.160212.7749@vax1.tcd.ie> smcgerty@vax1.tcd.ie writes: >>How about this, which takes about 2/3 of the time of the above: >> >>[..usage of movem deleted..] >> >>Anyone got any other tricks? > > Ya. Save yourself some code. Check out CopyMem() in exec.library > (V33 or greater). Disassemble it. Essentially, it is the above code. Hey cmon man, he doesn't want to hear about supplied software. Often you find stuff written by someone else, particularly the OS, sucks. You want one thing quick. It wants something else slow. So you write it _yourself_. At least that way you know exactly what's going on, how fast, and everyone will be able to use it. Not just people with V33 or greater, whatever that is. He asks (if you read the posting) if anyone else has any tricks. He wants to know if there are any other ways of squeezing more out of what is basically a not-very-fast-processor. One byte per 4 cycles stinks, so what'd it be like without movem? Are there any other ways of doing something else faster; try and get summat out of the machine, if you don't want to waste your money on a bigger chip in the series? Don't say find out about the OS, because it is a heap of it. You want _real_optimisation_ for the specific problem, for which some general ideas may help. Movem is one. The OS is not. Matt Dillon's program is very nice, coping with non-word boundaries and everything, but if you want _everything_ out of the machine, forget those checks. Align your data, and use the plain movems. Shove the loop in a cupboard, and in-line the code. On a processor running at the speed of a low 68000, those cycles count. Save them. Don't give a damn about memory. Remember, only a heartless fiend can get the true max out of the machine. Work everything to the bloody stumps, and waste everything else. T. SICK - the Slightly Intelligent Crazy Rosebi - We came. We saw. We went away again. #! r