This is the mail archive of the
mailing list for the GCC project.
Re: long long division 20% faster
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Fredrik Hederstierna <fredrik at wespot dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Earnshaw <rearnsha at arm dot com>
- Date: Thu, 19 Feb 2004 15:18:35 +0000
- Subject: Re: long long division 20% faster
- Organization: ARM Ltd.
- Reply-to: Richard Earnshaw <rearnsha at arm dot com>
> 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.
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.