This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: long long division 20% faster


fredrik@wespot.com said:
> I've made a simple improvement in the long-long division, it can
> result  in approx 20% faster code (on my ARM4-platform). On ARM5 it
> might be even faster.

> There is a generic improvement that it's based on the assumtion that a
>  modulo-operation (%) has higher cost than a multiplication an a
> substraction. Also I've made some ARM-assembly optimized inline macros
> for 64-bit  division.

> I also submit a simple patch for improved speed on double-division
> (the  one in fp-bits.c) that made my testcode about 15%faster.

> Please test this some more before anyone uses it sharp. I've only had
> possibilty to test it limited to arm-elf target with arm7tdmi core. 

Fredrik,

Thanks for your patch.  However, I think that Nicolas Pitre has beaten you 
to it :-)  His hand-coded floating point routines are between 5x and 25x 
faster than the fp-bit versions that they replaced.  He's also contributed 
some revamped division routines for use on armv4 and armv5 systems.

The new support routines will all be available in the 3.4.0 release of GCC.

R.


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