This is the mail archive of the newlib@sourceware.cygnus.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: memcpy performance (fnobuiltin)



I am forwarding these to the newlib mailing list for comments.  If there
is something which can improved for the newlib or egcs RTEMS
configuration, then we would like to go ahead and get it in. :) 

--joel

On Wed, 10 Dec 1997, Eric Norum wrote:

> I just finished building the RTEMS/GNU tools with  
> -DTARGET_MEM_FUNCTIONS=1.
> Things turned out pretty much as I expected:
> A call to memcpy is now just that -- a call to the memcpy routine.   
> No more overhead of calling bcopy then memmove then checking for  
> overlap.  The loop in the memcpy routine is still byte-by-byte (and 5  
> instructions on a CPU32+) though.
> 
> I think that -DTARGET_MEM_FUNCTIONS=1 should be part of the next  
> tools snapshot for RTEMS.
> 
> The small change I suggested about rearranging the memcpy loop  
> reduces the byte-by-byte loop to 3 instructions.  Better, but still  
> lots of room for improvement! The `right' thing to do, of course, is  
> to redo the memcpy routine `right' so that it doesn't do byte-by-byte  
> and has low-level versions for architectures that would benefit  
> (like the CPU32+ loop-mode operation).
> 
> ---
> Eric Norum                                 eric@skatter.usask.ca
> Saskatchewan Accelerator Laboratory        Phone: (306) 966-6308
> University of Saskatchewan                 FAX:   (306) 966-6058
> Saskatoon, Canada.
>