[cp-patches] Float/Double compare

2007-06-30 Thread Ian Rogers
Attached is a patch that improves the performance of an Float/Double compare by exploiting information carried in their bit integer/long versions sign bit. It removes one comparison from the normal path, as well as making other compares with ints/longs. When sorting an array of floats this can

Re: [cp-patches] Float/Double compare

2007-06-30 Thread Ian Rogers
Andrew Pinski wrote: On 6/30/07, Ian Rogers [EMAIL PROTECTED] wrote: Attached is a patch that improves the performance of an Float/Double compare by exploiting information carried in their bit integer/long versions sign bit. It removes one comparison from the normal path, as well as making

[cp-testresults] FAIL: regressions for mauve-jamvm on Sat Jun 30 11:25:02 UTC 2007

2007-06-30 Thread cpdev
Baseline from: Mon Jun 25 16:25:44 UTC 2007 Regressions: FAIL: java.awt.Component.properties FAIL: java.awt.Graphics.TestPaintGraphics FAIL: java.lang.Integer.parseInt FAIL: javax.swing.JLabel.AccessibleJLabel.getIndexAtPoint FAIL: javax.swing.JLabel.getActionMap FAIL:

[cp-testresults] FAIL: gcc build on Sat Jun 30 21:55:31 UTC 2007

2007-06-30 Thread cpdev
Makefile:12069: warning: ignoring old commands for target `multi-clean' make create-headers make[4]: Entering directory `/home/cpdev/Nightly/gcc/build/i686-pc-linux-gnu/libjava' Makefile:12089: warning: overriding commands for target `multi-do' Makefile:12022: warning: ignoring old commands for

[cp-testresults] FAIL: gcc build on Sun Jul 1 00:46:45 UTC 2007

2007-06-30 Thread cpdev
Makefile:12069: warning: ignoring old commands for target `multi-clean' make create-headers make[4]: Entering directory `/home/cpdev/Nightly/gcc/build/i686-pc-linux-gnu/libjava' Makefile:12089: warning: overriding commands for target `multi-do' Makefile:12022: warning: ignoring old commands for

[cp-testresults] FAIL: gcc build on Sun Jul 1 03:37:29 UTC 2007

2007-06-30 Thread cpdev
Makefile:12069: warning: ignoring old commands for target `multi-clean' make create-headers make[4]: Entering directory `/home/cpdev/Nightly/gcc/build/i686-pc-linux-gnu/libjava' Makefile:12089: warning: overriding commands for target `multi-do' Makefile:12022: warning: ignoring old commands for

NPE in gnu.java.awt.java2d.AbstractGraphics2D.renderScanline

2007-06-30 Thread Christian Thalinger
Hi! Another NPE when building openjdk with GNU Classpath: $ cat /home/twisti/cacao/sun/openjdk/jdk/j2se/src/solaris/classes/sun/awt/X11/java-icon16.png | /home/twisti/tmp/cacao/bin/java -client -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -classpath

Re: NPE in gnu.xml.transform.WithParam.getValue

2007-06-30 Thread Christian Thalinger
On Mon, 2007-06-25 at 00:09 +0200, Christian Thalinger wrote: On Sun, 2007-06-24 at 23:57 +0200, Mark Wielaard wrote: On Sun, 2007-06-24 at 14:12 +0200, Christian Thalinger wrote: When building HotSpot in OpenJDK with CACAO I get this NPE: /home/twisti/tmp/cacao/bin/java -classpath

Float/Double compare

2007-06-30 Thread Ian Rogers
Hi everyone, I was tracking a bug and came across the code in Float.compare which is very similar to Double.compare. It just so happened that the bug was being caused by sorting arrays containing lots of floating point 0s. This occurs quite frequently in the Jikes RVM when we have an array of

Re: Float/Double compare

2007-06-30 Thread Ian Rogers
Ian Rogers wrote: public static int compare(float x, float y) { if (isNaN(x)) return isNaN(y) ? 0 : 1; if (isNaN(y)) return -1; // recall that 0.0 == -0.0, so we convert to infinities and try again if (x == 0 y == 0) return (int) (1 / x - 1 / y); if (x ==

Re: Float/Double compare

2007-06-30 Thread Ian Rogers
In terms of performance I just tried sorting an array of floats with the new code (floatAsIntBits should have been floatToIntBits, sorry). The test was to initialize an array of floats backwards and then sort it to be ascending. Running a large enough array and enough iterations to get a ~4