[kaffe] Removed GMP math?

Andrew John Hughes gnu_andrew at member.fsf.org
Thu Feb 28 14:45:51 PST 2008


On 28/02/2008, Andrew John Hughes <gnu_andrew at member.fsf.org> wrote:
> ---------- Forwarded message ----------
>  From: Andrew John Hughes <gnu_andrew at member.fsf.org>
>  Date: 28 Feb 2008 09:51
>  Subject: Re: [kaffe] Removed GMP math?
>  To: Alan Eliasen <eliasen at mindspring.com>
>  Cc: kaffe at kaffe.org
>
>
>  On 28/02/2008, Alan Eliasen <eliasen at mindspring.com> wrote:
>   > Jim Pick wrote:
>   >  > What's New In Kaffe 1.1.9
>   >  > ----------------------------
>   >  >
>   >  > * Removed support for native big math.
>   >
>   >    I have to admit, I was *very* disappointed when I saw this.  The fact
>   >  that Kaffe could use the best-of-breed GMP libraries to perform
>   >  operations with very large BigIntegers was the sole reason that I used
>   >  and advocated Kaffe.  It was the one place where programs run under
>   >  Kaffe could be enormously, incredibly faster than other JVMs, often by
>   >  factors of 1000 or even 100,000.  The algorithms that replaced it are
>   >  *vastly* slower for very large numbers.
>   >
>   >    Why was this done?  It constitutes a severe performance regression
>   >  for many programs, and was already switchable so that it could be
>   >  compiled in and used or not used at runtime if desired, or completely
>   >  omitted from compilation if you didn't want it.
>   >
>   >    While I am working very hard at implementing faster algorithms for
>   >  the OpenJDK project, my best algorithms are still factors of about 100
>   >  times slower than Kaffe/GMP for many large numbers, and nothing one
>   >  could do in Java could ever match their performance.
>   >
>   >    How much trouble would it be for whoever removed these parts to
>   >  revert those changes?  I think they were removed without concern for the
>   >  people who use Kaffe for this very reason, and this reason alone.  For
>   >  me, and the people that use Kaffe/GMP for work in number theory, this is
>   >  a heartbreaking regression, and one that, quite frankly, makes Kaffe
>   >  rather unsuitable for my use, as it tends to be about 20-25 times slower
>   >  than other JVMs for most other programs.
>   >
>   >  --
>   >   Alan Eliasen              |  "Furious activity is no substitute
>   >   eliasen at mindspring.com    |    for understanding."
>   >   http://futureboy.us/      |           --H.H. Williams
>   >
>   >  _______________________________________________
>   >  kaffe mailing list
>   >  kaffe at kaffe.org
>   >  http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
>   >
>
>
>  Hi Alan,
>
>   I obviously can't speak for Dalibor's motives on this, but I believe
>   the reason for removing GMP from Kaffe was to reduce the amount of
>   maintenance involved.  The intention is to instead maintain such class
>   library extensions in GNU Classpath itself, so GMP support will be
>   added there (thus giving this same performance advantage to many VMs).
>
>   On that subject, Dalibor, can you point me at Raif's patch for adding this?
>
>   Thanks,
>
>  --
>   Andrew :-)
>
>   Support Free Java!
>   Contribute to GNU Classpath and the OpenJDK
>   http://www.gnu.org/software/classpath
>   http://openjdk.java.net
>
>
>  --
>  Andrew :-)
>
>  Support Free Java!
>  Contribute to GNU Classpath and the OpenJDK
>  http://www.gnu.org/software/classpath
>  http://openjdk.java.net
>

I took Raif's patch, updated it and committed it to GNU Classpath this evening:

2008-02-28  Andrew John Hughes  <gnu_andrew at member.fsf.org>

        PR classpath/28664
        * include/Makefile.am:
        Add generation of header file java_math_VMBigInteger.h
        * java/math/BigInteger.java: Separate NativeMPI into
        VMBigInteger.
        * native/jni/Makefile.am: Add java-math.
        * native/jni/java-math/java_math_VMBigInteger.c:
        Renamed from java_math_BigInteger.c.
        * vm/reference/java/math/VMBigInteger.java:
        Former NativeMPI class from java.math.BigInteger.

2006-11-28  Raif S. Naffah  <classpath at naffah-raif.name>
            Jeroen Frijters <jeroen at sumatra.nl>

        PR classpath/28664
        * configure.ac: Add support for configuring GNU MP.
        * native/jni/Makefile.am: Include java-math directory if required.
        * native/jni/java-math/.cvsignore: New file.
        * native/jni/java-math/Makefile.am: Likewise.
        * native/jni/java-math/java_math_BigInteger.c: Likewise.
        * java/math/BigInteger.java: Added support for native methods.
        * gnu/classpath/Configuration.java.in
(WANT_NATIVE_BIG_INTEGER): New field.
-- 
Andrew :-)

Document Freedom Day - March 26th
http://documentfreedom.org

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net




More information about the kaffe mailing list