GMP Module (perl)

Kevin Ryde
Sat, 26 Jul 2003 09:02:37 +1000

"Sisyphus" <> writes:
> I could, of course, simply use the msvc-built binaries with my gcc-built
> perl. My reason for not doing so is that my (standard edition) msvc++ 6.0
> does not perform optimisation. I'm not so sure that's a *valid* reason. The
> GMP dll *was* built with an optimising compiler and, faik, it may well be
> insignificant whether the actual perl module is built with an optimising
> compiler or not. (If you have any views on that aspect I'd be interested to
> hear them.)

The asm routines are the most important thing for speed in gmp.  After
that we usually recommend gcc, since it gets various inline asm
blocks.  The generated perl stuff is pretty straightfoward and
unlikely to be affected one way or the other.

> g++ didn't like having a variable named 'class'

Ah yes, I might change that.

> It's nicer, imo, to use
> than Math::GMP, and additionally provides access to a greater range of GMP
> functions.

More functions was the aim.

> Have you considered placing it on cpan ?

It was easier to get started just chucking it in the gmp sources.  I
suppose at least a cross reference in cpan would be nice.

> I'm not sure how the
> perl people would feel about the 'GMP' namespace, and the 'Math::GMP'
> namespace is already taken ........

I hadn't wanted to worry about being Math::BigInt compatible, so did
something new.  I think BigInt was a bit bare when I'd first looked at
it too.  Seems to have grown since then, might be the way to go for
the future.