This is the mail archive of the 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

> 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.

Yes, I've tested Pitre's stuff together with gcc-3.4.0 and HEAD
('gcc-3.5.0 experimental'..?), and the code is really amazingly fast!
But to be clear: The patch on the 'fp-bit.c'-file is still valid for
targets which use this code (not ARM since gcc-3.4.x, but alot of other
targets, or?).
>  He's also contributed  some revamped division routines for use on armv4
>  and armv5 systems.
When I tested the patch I used both gcc-3.4.0 and gcc-3.5.0 (HEAD from
today) and the speed improvement _was_ 20% for the long-long-div including
Pitre's stuff (if it is in CVS). Does the new long-long-div code override
the code in 'libgcc2.c' and the macros in 'longlong.h' like udiv_qrnnd(),
The improvement for double-div was tested with gcc-3.3.2 (arm-elf target
for gcc-3.3.3 does not compile!) and got a 15% speedup. It should still be
valid for non-ARM targets and still interesting I think. This goes also
with the longlong-div, one of the speedups are generic.
I think the code structure regarding longlong is a bit messy in GCC. It
would be nicer if 'longlong.h' consisted of includes with path to the
currently compiled target like gcc/config/arm or whatever the path is. Now
all machine dependent code is entered in a single file. It will become a
#ifdef-hell as time goes by...
But I hope Pitre has done a complete assembly implementation of
ARM-longlong-arithmetics, that would be really nice. Otherwise I think I
would like to start code one... :-)
Best Regards,
Fredrik Hederstierna

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