Subject: Re: shocking speed performance!
To: None <richard.earnshaw@arm.com>
From: None <kim@pvv.ntnu.no>
List: port-arm32
Date: 05/21/1999 13:40:34
> kim@pvv.ntnu.no said:
> > Sigh. GCC is able to get the right library. At least VAX and Sparc gcc
> > does it right. 
> 
> Those functions are in libc.so; this has nothing to do with gcc, it's 
> where NetBSD puts them.  Since they are in there and existing pre-compiled 
> programs rely on the format of the values passed, you can't just change 
> the format to something different.

You put math functions in libc?
That is the wrong place.
Math functions should be in the math libraries.
On some platforms there are several math libraries, with different
properties. 

Putting math in libc makes things messy. 
Why not put it where it belongs?

> Since *you* think I'm confused, why don't you prepare a technical spec of 
> exactly what you want to change (with some concrete examples of how it 
> would work).  Then we might all understand what you are going on about.

I am talking about implementing macroes/inline-code/extended-instructions
in gcc for addition, subtraction, multiplication, and division of floats.

Floats here are not IEEE standard floats, but a different format, optimized
for fast ARM execution, 32 bit exponent and 32 bit mantissa.

Calculation of Sin, cos, sqrt, etc, can be done easily, as those functions
are defined to be double, and C automagically converts between doubles and
floats. 

As meantioned earlier, gcc is built to handle multiple math formats.
I remember working with gcc for SunOS on 68020 processors, and
discovered I could get enormous speed up of math by linking with
the FPU library instead of the standard math library. Of course this
only worked on machines with FPU.

Also as mentioned earlier, I worked 3 months of evenings on this project
some years ago, and was stopped by uncompilable gcc. I have told you
about this project several times before in these years.

Kim0