[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-mlvm-dev
Subject:    Rtalk Performance  for micro benchmarks (how to improve)
From:       mroos () roos ! com (Mark Roos)
Date:       2012-09-18 2:46:09
Message-ID: OFA3E902C8.C73E43B6-ON88257A7D.000475CF-88257A7D.000F38A0 () roos ! com
[Download RAW message or body]

After reading Charles' blog on 'fast' ruby I decided to look at how Rtalk 
was
comparing.  At the same time I loaded the latest JDK8 just to compare.

First jdk 8 runs (excellent) with some things faster but most slower.  But 
to
my chagrin Rtalk running FIB(35) is much slower than Charles' effort. 
700ms vs 300ms.
So I am wondering what I could be doing that could improve.  At the end 
are my
jvm bytecodes for fib ( which look ok ).  I am doing all 64 bit and my 
integer
code does do conversions to/from BigIntegers.  I also use a 4K small 
integer
cache to help with object creation.

To do some research I have two versions of Hanoi as well.  The Rtalk 
version and
an implementation in Java where I do the exact work but without 
invokeDynamic.
Here I run 100% slower vs Charles' 30%.

Suggestions?  Cmd line args, compiler choice? where to look?

Thanks
mark


64 bit OSX 2.8 GHz core 2 duo
No cmd line options
Times are the min of 10 runs.

JDK 7u2 Oracle site
Starting FIB 35
  Time (ms) 617
Starting Fib 40
  Time (ms) 6982
Starting Java Hanoi 25 10X
  Time (ms) 294
Starting RTALK Hanoi 25
  Time (ms) 629

JDK 8 ( 9/14)  Google code b56
Starting FIB 35
  Time (ms) 776
Starting Fib 40
  Time (ms) 8668
Starting Java Hanoi 25 10X
  Time (ms) 292
Starting RTALK Hanoi 25
  Time (ms) 752

Code generated by Rtalk compiler
Push Constant is a ConstantCallSite
Perform is an InvokeDynamic MutableCallSite with a single GWT

CLASS                rtPbc/r957 extends Object 
METHOD               invoke RtObject,RtObject,RtObject, access=9 
FRAME                -1 localVarCnt=2 {ri/core/rtalk/RtObject, 
ri/core/rtalk/RtObject, null, null, null, null} stackCnt=0 {null, null} 
Push Constant        2 
                     aload 0 
Perform              <   line  7 
                     getstatic ri/core/rtalk/RtObject _false 
Lri/core/rtalk/RtObject; 
JUMP                 if_acmpeq LABEL 2 
                     aload 0 
JUMP                 goto LABEL 3 
LABEL                LABEL 2 
FRAME                -1 localVarCnt=2 {ri/core/rtalk/RtObject, 
ri/core/rtalk/RtObject, null, null, null, null} stackCnt=0 {null, null} 
                     aload 1 
                     astore 4 
Push Constant        1 
                     aload 0 
Perform              -   line  42 
                     aload 4 
Perform              supportFib:   line  60 
                     astore 4 
                     aload 1 
                     astore 5 
Push Constant        2 
                     aload 0 
Perform              -   line  87 
                     aload 5 
Perform              supportFib:   line  105 
                     aload 4 
Perform              +   line  123 
LABEL                LABEL 3 
FRAME                -1 localVarCnt=2 {ri/core/rtalk/RtObject, 
ri/core/rtalk/RtObject, null, null, null, null} stackCnt=1 
{ri/core/rtalk/RtObject, null} 
                     areturn 
                     maxStack 2, maxLocals 6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120917/41f27efa/attachment.html 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic