Good news, bad news
Christian Thalinger
christian.thalinger at oracle.com
Thu May 26 01:42:07 PDT 2011
On May 26, 2011, at 9:15 AM, Charles Oliver Nutter wrote:
> On Thu, May 26, 2011 at 1:58 AM, Tom Rodriguez <tom.rodriguez at oracle.com> wrote:
>> but test is some ugly goo because of boxing. It's relatively easy to get the optimizer to fold away the boxing for boolean but sadly it doesn't help the performance at all. Additionally that ends up touching a fair amount of common code which makes it a little more risky for 7.
>
> It is definitely frustrating to see that perf has degraded so much the
> past couple weeks and still not be there with the reverted code. I'm
> hoping your fix will help bring the promised ricochet perf to JRuby,
> but so far we're a long way off from what perf looked like on earlier
> builds. There must be something more obvious than boolean box
> folding...perhaps obvious enough we're not seeing it yet.
I also did some performance testing. I used a recent HS repository, applied Tom's patch, used a recent meth.jar provided by John and this is what I got:
intelsdv07:~/mlvm/jruby$ bin/jruby.sh -J-Xbootclasspath/p:meth.jar --server -Xcompile.invokedynamic=false bench/bench_fib_recursive.rb 10 35
1.107000 0.000000 1.107000 ( 1.078000)
0.982000 0.000000 0.982000 ( 0.982000)
0.981000 0.000000 0.981000 ( 0.981000)
0.980000 0.000000 0.980000 ( 0.980000)
0.980000 0.000000 0.980000 ( 0.980000)
0.979000 0.000000 0.979000 ( 0.979000)
0.980000 0.000000 0.980000 ( 0.980000)
0.980000 0.000000 0.980000 ( 0.980000)
0.989000 0.000000 0.989000 ( 0.989000)
0.979000 0.000000 0.979000 ( 0.979000)
intelsdv07:~/mlvm/jruby$ bin/jruby.sh -J-Xbootclasspath/p:meth.jar --server -Xcompile.invokedynamic=false -Xcompile.dynopt=true bench/bench_fib_recursive.rb 10 35
0.895000 0.000000 0.895000 ( 0.864000)
0.761000 0.000000 0.761000 ( 0.761000)
0.763000 0.000000 0.763000 ( 0.763000)
0.763000 0.000000 0.763000 ( 0.763000)
0.763000 0.000000 0.763000 ( 0.763000)
0.765000 0.000000 0.765000 ( 0.765000)
0.764000 0.000000 0.764000 ( 0.764000)
0.762000 0.000000 0.762000 ( 0.762000)
0.772000 0.000000 0.772000 ( 0.772000)
0.762000 0.000000 0.762000 ( 0.762000)
intelsdv07:~/mlvm/jruby$ bin/jruby.sh -J-Xbootclasspath/p:meth.jar --server -Xcompile.invokedynamic=true bench/bench_fib_recursive.rb 10 35
1.074000 0.000000 1.074000 ( 1.045000)
0.929000 0.000000 0.929000 ( 0.928000)
0.925000 0.000000 0.925000 ( 0.925000)
0.925000 0.000000 0.925000 ( 0.925000)
0.924000 0.000000 0.924000 ( 0.924000)
0.923000 0.000000 0.923000 ( 0.923000)
0.923000 0.000000 0.923000 ( 0.923000)
0.935000 0.000000 0.935000 ( 0.935000)
0.926000 0.000000 0.926000 ( 0.926000)
0.920000 0.000000 0.920000 ( 0.920000)
Here are the numbers from April 28 on the same machine:
http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-April/002873.html
Although I can't remember if the invokedynamic numbers were with or without the guard-removal-hack I tried at that time (I think without, because with the hack the numbers should be very similar to dynopt, see: http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-April/002869.html).
Using Tom's new code doesn't make a difference since I think the meth.jar from John includes the reverted GWT code.
A quick check on bench_string_ops.rb shows that a couple of numbers are better but some are worse, especially string == comparison (compare with http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-April/002887.html):
intelsdv07:~/mlvm/jruby$ bin/jruby.sh -J-Xbootclasspath/p:meth.jar --server -Xcompile.invokedynamic=true -J-XX:+UnlockDiagnosticVMOptions -J-XX:+UseNewCode2 bench/bench_string_ops.rb Measure string array sort time
2.726000 0.000000 2.726000 ( 2.698000)
2.651000 0.000000 2.651000 ( 2.651000)
2.648000 0.000000 2.648000 ( 2.648000)
2.647000 0.000000 2.647000 ( 2.647000)
2.632000 0.000000 2.632000 ( 2.632000)
Measure hash put time
0.184000 0.000000 0.184000 ( 0.184000)
0.096000 0.000000 0.096000 ( 0.096000)
0.096000 0.000000 0.096000 ( 0.096000)
0.100000 0.000000 0.100000 ( 0.100000)
0.093000 0.000000 0.093000 ( 0.093000)
Measure hash get time (note: not same scale as put test)
0.364000 0.000000 0.364000 ( 0.364000)
0.251000 0.000000 0.251000 ( 0.250000)
0.251000 0.000000 0.251000 ( 0.251000)
0.258000 0.000000 0.258000 ( 0.258000)
0.250000 0.000000 0.250000 ( 0.250000)
Measure string == comparison time
0.511000 0.000000 0.511000 ( 0.511000)
0.314000 0.000000 0.314000 ( 0.314000)
0.309000 0.000000 0.309000 ( 0.309000)
0.310000 0.000000 0.310000 ( 0.310000)
0.310000 0.000000 0.310000 ( 0.310000)
Measure string == comparison time, different last pos
0.549000 0.000000 0.549000 ( 0.549000)
0.367000 0.000000 0.367000 ( 0.366000)
0.367000 0.000000 0.367000 ( 0.367000)
0.368000 0.000000 0.368000 ( 0.368000)
0.372000 0.000000 0.372000 ( 0.372000)
Measure string <=> comparison time
0.435000 0.000000 0.435000 ( 0.435000)
0.216000 0.000000 0.216000 ( 0.216000)
0.218000 0.000000 0.218000 ( 0.218000)
0.216000 0.000000 0.216000 ( 0.216000)
0.217000 0.000000 0.217000 ( 0.217000)
Measure 'string'.index(fixnum) time
0.358000 0.000000 0.358000 ( 0.358000)
0.215000 0.000000 0.215000 ( 0.215000)
0.215000 0.000000 0.215000 ( 0.215000)
0.216000 0.000000 0.216000 ( 0.216000)
0.214000 0.000000 0.214000 ( 0.214000)
Measure 'string'.index(str) time
0.546000 0.000000 0.546000 ( 0.546000)
0.388000 0.000000 0.388000 ( 0.388000)
0.387000 0.000000 0.387000 ( 0.387000)
0.390000 0.000000 0.390000 ( 0.391000)
0.390000 0.000000 0.390000 ( 0.390000)
Measure 'string'.rindex(fixnum) time
0.348000 0.000000 0.348000 ( 0.348000)
0.226000 0.000000 0.226000 ( 0.226000)
0.225000 0.000000 0.225000 ( 0.225000)
0.229000 0.000000 0.229000 ( 0.229000)
0.225000 0.000000 0.225000 ( 0.225000)
Measure 'string'.rindex(str) time
0.763000 0.000000 0.763000 ( 0.763000)
0.623000 0.000000 0.623000 ( 0.623000)
0.622000 0.000000 0.622000 ( 0.622000)
0.623000 0.000000 0.623000 ( 0.623000)
0.621000 0.000000 0.621000 ( 0.621000)
-- Christian
More information about the mlvm-dev
mailing list