Using the debug build and base_hsdis, the code seems to be more understandable to me.
For the Fibonacci program, inlining is working great. Numerical runtime methods, i.e. plus and minus, has been inlined into a compiled method of Fib.fib. However, a lot of boxing/unboxing pairs are still there. This is not a surprise because the JIT does not seem to have knowledge about the runtime methods of G7 (of course, for runtime of any other languages as well). But it would be really great if we can add some knowledge to JIT to optimize away these boxing/unboxing pairs. A very long listing of disassembled Fibonacci is here: http://pastebin.com/dfd44507 Cheers, Chanwit On Wed, Jul 8, 2009 at 9:01 PM, Chanwit Kaewkasi<chan...@gmail.com> wrote: > On Wed, Jul 8, 2009 at 8:50 PM, Jochen Theodorou<blackd...@gmx.org> wrote: >> Chanwit Kaewkasi schrieb: >>> Hi all, >>> >>> I have re-run a Fibonacci benchmark generated by my G7 compiler on the >>> latest mlvm build (also with indy.compiler and indy.compiler.inline >>> patches). >>> And the performance is incredible !!! >>> >>> [r...@andlinux g7]# time `java -cp >>> .:target/classes/:target/test-classes -server -XX:+EnableInvokeDynamic >>> g7.tests.classgen.Fib` >>> >>> real 0m2.230s >>> user 0m1.940s >>> sys 0m0.250s >>> >>> It's very close to *native Java* now, if I correctly remember the figure. >> >> from looking at the produced bytecode you did show I assume there is >> still some potential if boxing of int can be avoided. > > Currently the bootstrap in G7 does not support primitives, so this is > possibly true. > >> Or is that >> optimized away? > > Really do not know what's happening behind the scene. It would be > great if I could be able to dump and see the optimized native codes. > > Cheers, > > Chanwit > >> bye Jochen >> >> -- >> Jochen "blackdrag" Theodorou >> The Groovy Project Tech Lead (http://groovy.codehaus.org) >> http://blackdragsview.blogspot.com/ >> >> _______________________________________________ >> mlvm-dev mailing list >> mlvm-dev@openjdk.java.net >> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev >> > > > > -- > Chanwit Kaewkasi > PhD Candidate, > Centre for Novel Computing > School of Computer Science > The University of Manchester > Oxford Road > Manchester > M13 9PL, UK > -- Chanwit Kaewkasi PhD Candidate, Centre for Novel Computing School of Computer Science The University of Manchester Oxford Road Manchester M13 9PL, UK _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev