Chris Oliver's Weblog
- All
- F3
- JavaFX
- Programming
- Research
First steps with the JavaFX Compiler
Thanks to the efforts of Robert Field, Lubo Litchev, and Jonathan Gibbons of the Javac team, as well as Per Bothner and Brian Goetz (and also thanks to the organizational efforts of Bob Brewin, James Gosling, and Tom Ball) we have the beginnings of a JavaFX to JVM-byte-code compiler built on the same infrastructure as Javac.
Of course, the compiler is still incomplete, but it turns out to be far enough along to try a first performance benchmark (Takeuchi function):
import java.lang.System;
public class Tak {
operation tak(x:Number, y: Number, z:Number):Number;
}
operation Tak.tak(x, y, z) {
return if (y >= x)
then z
else tak(tak(x-1, y, z),
tak(y-1, z, x),
tak(z-1, x, y));
}
var tak = new Tak();
System.out.println("tak(24,16,8)={tak.tak(24, 16, 8)}");
$ time java -cp ".;dist/JavaFX.jar" TakMod
tak(24,16,8)=9.0
real 0m1.333s
user 0m0.010s
sys 0m0.020s
Here's the interpreter:
$ time bin/javafx.sh TakMod.fx compile thread: Thread[main,5,main] compile 0.04 tak(24,16,8)=9.0 init: 69.48 real 1m10.422s user 0m0.190s sys 0m0.130sSpeed improvement for this particular example is a pretty awesome 54x.
Posted at 03:25PM Jul 14, 2007 by Christopher Oliver in JavaFX | Comments[16]
Posted by peter on July 14, 2007 at 07:18 PM PDT #
Posted by Hans Uvstohn on July 15, 2007 at 08:48 AM PDT #
Posted by David Ford on July 15, 2007 at 11:42 AM PDT #
Posted by peter on July 17, 2007 at 10:48 AM PDT #
There is a figure for you.
JavaFX Interpreter (Class Loader) => Run-Time
JavaFX Compiler => Compiler-Time
Comparing compiler-time performance with run-time performance is meaningless.
Posted by Jerry Tsai on July 17, 2007 at 07:15 PM PDT #
Posted by peter on July 18, 2007 at 04:33 AM PDT #
Posted by Tom Palmer on July 19, 2007 at 12:33 PM PDT #
Posted by 61.8.226.148 on July 19, 2007 at 12:33 PM PDT #
Posted by Tom Ball's Blog on July 20, 2007 at 06:50 AM PDT #
Posted by Fabrizio Giudici on July 20, 2007 at 04:28 PM PDT #
At least loop it a 1000 times to give some meaningful results.
Currently you are mostly measuring pure VM startup times vs JavaFX startup times, taking absolutely no advantage of HotSpot at all.
You also should include the timings for a pure java implementation as reference.
I just checked a C implementation, at about 12s/1000 loops on a 2Ghz core2.
Posted by Eike Dierks on July 21, 2007 at 08:50 PM PDT #
Posted by Felipe Gaucho on July 22, 2007 at 03:42 AM PDT #
http://www.batterylaptoppower.com/toshiba/satellite-a60.htm toshiba satellite a60 battery,
http://www.batterylaptoppower.com/toshiba/satellite-a65.htm toshiba satellite a65 battery,
http://www.batterylaptoppower.com/toshiba/pa33842u-1brs.htm toshiba pa33842u-1brs battery,
http://www.batterylaptoppower.com/toshiba/pa3384u-1bas.htm toshiba pa3384u-1bas battery,
http://www.batterylaptoppower.com/toshiba/pa3356u-1brs.htm toshiba pa3356u-1brs battery,
http://www.batterylaptoppower.com/toshiba/portege-m300.htm toshiba portege m300 battery,
http://www.batterylaptoppower.com/toshiba/portege-m500.htm toshiba portege m500 battery,
http://www.batterylaptoppower.com/toshiba/pa3128u.htm toshiba pa3128u battery,
http://www.batterylaptoppower.com/toshiba/pa3191u.htm toshiba pa3191u battery,
Posted by Glynis Ayling on November 07, 2008 at 11:36 PM PST #
So will Sun's heavy support of JavaFX finally lead to JVM support for tail recursion? That's the hope I just got while looking at this (though I'm not fresh on the details of proper tail recursion - not sure if this example applies - still, I understand that many functional folk are dying for it, and I understand why they want it).
Posted by Warhammer Online Gold on March 11, 2009 at 10:03 PM PDT #
http://www.smsmatbaa.com
Posted by matbaa on June 22, 2009 at 10:05 AM PDT #
http://www.egzotik.org
http://www.kerizimcet.com
http://www.chatsiteleri.net
http://www.askfali.org
http://www.kurabiyetarifleri.net
http://www.sevdaduragi.com
http://www.sohbetsi.net
http://www.bedavafilmizlesene.org
http://www.partnercafe.net
http://www.tubam.net
http://www.motifmatik.net
Posted by çet on July 04, 2009 at 03:16 AM PDT #