c++ patch

Marc Glisse marc.glisse at normalesup.org
Tue May 23 14:26:20 CEST 2006


On Mon, 22 May 2006, Torbjorn Granlund wrote:

>  I hope someone at Sun has read all the comments in the sparc32 and
>  sparc64 subdirectories of gmp/mpn (and maybe someone will update it for
>  more recent hardware).
>
> What are the problems wrt recent hardware?
> The current code runs OK on ultrasparc 1-4, I think.

The comments in the sparc* subdirectories only mention ultrasparc 1-3. If 
you looked at an ultrasparc IV+ and concluded it was similar enough to III 
that there was not much possible improvement in the assembly used, it 
would be nice to add a comment somewhere that says exactly that.

> I know the ultrasparc T1 isn't too happy with the floating-point
> addmul_1 and addmul_2, but I doubt anything else would be much faster.

Using the FPU is not only very slow on that machine, it also paralyses 4 
cores. It may even be more efficient to use soft floats... If someone 
really wanted to test gmp on that machine, I believe the way to go would 
be to compile a version of gmp that does not use the FPU at all, and then 
run 100 gmpbench in parallel. It is still not exactly what that machine is 
for, but is already closer than measuring single thread FPU performance.

> The type is one thing, the available instructions is another.
> And then we have alignment, and other factors.
> All-in-all, a 32-bit ABI is generally a lot slowed for GMP than
> a 64-bit ABI.  That's true even if you could use long long.

Thank you for the explanation. I don't know much about this kind of thing, 
so except when I am talking about c++, expect what I say to be 
nonsense...

-- 
Marc Glisse


More information about the gmp-bugs mailing list