Hello everybody. When trying out 1.7.0 to see if I could get that "speed boost" from invoke dynamic, I tried this code: https://gist.github.com/2961231 with jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_04) [Windows 7-amd64-java] It takes this long: (jruby mandel.rb 500) 3.484393 seconds. with jruby 1.7.0.preview2.dev (ruby-1.9.3-p203) (2012-06-14 fb4c77f) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_04) [Windows 7-amd64-java] It takes this long: 6.029411 seconds. With 2000, 1.6.5 takes 23.8s, 1.7.0 takes 25.2 With 4000, 1.6.5 takes 98.6s, 1.7.0 takes 90.0s Any insights out there? Is this just a startup time slowdown? Also shouldn't I be seeing some kind of crazy speedup time because it's using 1.7.0 with invokedynamic now? Thanks. -roger-
on 2012-06-20 20:09
on 2012-06-21 02:36
Very likely just a warmup time issue. Invokedynamic performance is more sensitive to warmup because until indy call sites JIT they use a lot of really slow code. That is supposed to improve in an upcoming release (probably u8) but until then it should not be surprising to see cold perf looking much worse than non-indy.