[kaffe] CVS kaffe (dalibor): Reworked support for class library profiles and big math

Dalibor Topic robilad at kaffe.org
Tue Aug 10 09:39:40 PDT 2004


Alan Eliasen wrote:

>    Dalibor,
> 
>    I'm a little late to notice this, but could you explain the reason to make
> the all-java implementation of BigInteger to be the default?  If one has
> explicitly compiled in the GMP libraries, I'd think that they'd intend for
> that to be the default.

Hi Alan,

thanks a lot for taking the time to comment. I'll make sure that if GMP 
is around, we use the native libs, as Matthew Toseland requested the 
same for Freenet. I'm not quite sure what would be the best way to do 
it, so I'll need to think a bit about how to do it.

The reason for the switch to pure java implemenation is simple: it means 
that people who don't have GMP installed, will get an rt.jar whose 
java.math works without having to deal with configure options. It works 
slowly, but it does something :). So it made the initial class library 
build much easier.

In order not to pessimize the build for people using java.math with gmp 
there are two options: detect whether gnu mp is installed and use it 
during build, or allow people to enable gnu mp explicitely. I've 
currently went for 'build all options you can, and use a compile time 
switch to decide'.

>    Could we make native-big-math the default if it's compiled in?  I was sure
> wondering why everything got so slow all of a sudden!  Calculations went from
> milliseconds to minutes or hours!

Sure. I'm unsure what the best way would be. Would you prefer an 
'autodetect if GMP is around at configure time, and use it' approach, or 
an 'explicitely enable GMP support during configure to make the default' 
approach?

cheers,
dalibor topic





More information about the kaffe mailing list