[EMAIL PROTECTED] writes:
 > On Tue, Jun 13, 2006 at 12:01:39PM +0100, Andrew Haley wrote:
 > > 
 > > All you've got here is an inline asm version of 
 > > 
 > > inline void longcpy(long* _dst, long* _src, unsigned _numwords)
 > > {
 > >   __builtin_memcpy (_dst, _src, _numwords * sizeof (long));
 > > }
 > > 
 > > which gcc will optimize if it can.  
 > > 
 > > These days, "rep movs" is not as advantageous as it once was, and you
 > > may get better performance by allowing gcc to choose how to do memory
 > > copies.
 > 
 > Actually, I knew this, but I was using longcpy as a bellwether
 > of many more complex inline-asm functions in a c++ big integer
 > library.

OK.  I'm used to seeing random bits of inline asm that might have made
sense Once Upon A Time but now only serve to slow down a program!

 > I've just finished a trawl through the entire library, fixing a Good
 > Many Things which I now know (thanks to you guys) could really confuse
 > the optimiser.

That's great.

Andrew.

Reply via email to