> Bruce Partridge wrote: > > This is the code I timed: > > for (i=0; i<16; i++) > > { > > temp_array1[i] = array1[i]; > > temp_array2[i] = array2[i]; > > } > > > > All of the arrays are 32 bit float. > > Argh! This is exactly the kind of reason you need to know what > you're doing > at the machine laguage level, whether using assembler or a compiler. > Apparently this is on an 18 family PIC. You could unroll the whole loop > into 128 MOVFF instructions if program space is not a problem. The next > fastest method would be to make good use of the autoincrement FSRs. This > may be difficult for the C compiler to figure out. This is very likely > prevented altogether by putting both copy operations in the same loop. > Again *THINK* about what has to go on. If you did one array, then the > other, you could blast thru each array without having to reload FSRs. > Switching arrays every 4 bytes is silly. I'd be real impressed if the > compiler could rewrite this as two separate array copies. Thanks. Thats great information. I have used other assemblers, but I am pretty new to PIC assembler. Although it appears I am going to have the code space and cycles to get this running (just), I will probably be able to pick up a lot by going over the assembler in detail. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.543 / Virus Database: 337 - Release Date: 11/21/2003 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body