Why is it compiling GMP so hard?

Paul Leyland paul at leyland.vispa.com
Fri Mar 11 09:38:01 CET 2005


On Fri, 2005-03-11 at 05:47, Sisyphus wrote:
> Brian Gladman wrote:
> > Sisyphus wrote:
> > 
> 
> >>
> >>Or - is there a performance hit involved here ?
> >>In other words, what is gained by building GMP the way Brian does it ?
> > 
> > 
> > This rather depends on what you mean by performance - if you mean speed
> > of GMP code when running, in most cases there is no performance hit
> > since the core functionality of GMP is written in assembler.

> Yes - and I would be one who doesn't have the the experience needed 
> (since I only ever build with gcc) - which is why I asked the question 
> (prompted by Pauls' mention of "high performance"). Thank you for a very 
> good answer.

I now realise I should have clarified that remark, but my message was
already long enough.

It is possible, with rather a lot of work, to build GMP with Visual
Studio almost out of the box.  The lack of "configure" on an unadorned
Windows machine means that much of what it does has to be done by hand. 
However, because gcc and VS use entirely different assembly language
syntax, I only ever managed to build a generic library.  The performance
of the generic library is markedly inferior to that of libraries
carefully tailored to a particular processor.

There is a tool available which tries to convert between assembler
syntactes but it was sadly deficient when I last tried it around 3 years
ago.  I forget its name, so please forgive my vagueness.

It was after failing to convert the assembly code that I gave up and
stuck to the SFU solution.


Paul




More information about the gmp-discuss mailing list