Seconds after I email...A DISCOVERY... It seems like invokedynamic is causing headaches for coro. Here's the numbers with coro fibers and JRuby's invokedynamic support turned *off*:
100 fibers / 1000 passes: 0.076000 0.000000 0.076000 ( 0.077000) 100 fibers / 1000 passes: 0.076000 0.000000 0.076000 ( 0.076000) 100 fibers / 1000 passes: 0.105000 0.000000 0.105000 ( 0.105000) 100 fibers / 1000 passes: 0.070000 0.000000 0.070000 ( 0.070000) Perhaps the fix you (Lukas) made to get coro + indy working together has impacted performance? Awesome, awesome, awesome to see the above perf numbers...regardless! - Charlie On Wed, Nov 30, 2011 at 1:46 AM, Charles Oliver Nutter <head...@headius.com> wrote: > Ok, good news and not as good news! > > The good news is that coro seems to be working in the latest > openjdk-osx-build, and it definitely improves JRuby's coroutine > performance! > > For running bench_fiber_ring with 100 fibers passing 1000 messages, > here's numbers for the threaded impl: > > 100 fibers / 1000 passes: 1.070000 0.000000 1.070000 ( 1.071000) > 100 fibers / 1000 passes: 1.070000 0.000000 1.070000 ( 1.070000) > 100 fibers / 1000 passes: 1.092000 0.000000 1.092000 ( 1.092000) > 100 fibers / 1000 passes: 1.077000 0.000000 1.077000 ( 1.077000) > > And with the coro impl: > > 100 fibers / 1000 passes: 0.215000 0.000000 0.215000 ( 0.215000) > 100 fibers / 1000 passes: 0.217000 0.000000 0.217000 ( 0.217000) > 100 fibers / 1000 passes: 0.212000 0.000000 0.212000 ( 0.212000) > 100 fibers / 1000 passes: 0.216000 0.000000 0.216000 ( 0.215000) > > Hooray! > > Now for the not-as-good news... > > Here's Ruby 1.9.3 on the same benchmark: > > 100 fibers / 1000 passes: 0.160000 0.000000 0.160000 ( 0.155562) > 100 fibers / 1000 passes: 0.150000 0.000000 0.150000 ( 0.156581) > 100 fibers / 1000 passes: 0.160000 0.000000 0.160000 ( 0.155351) > 100 fibers / 1000 passes: 0.150000 0.000000 0.150000 ( 0.156776) > > Now even getting close to 1.9.3 is really awesome, but I'm wondering > if either I'm doing something wrong (maybe broke something in the > coro-based fiber impl?) or if something regressed in coro, because > Lukas's blog post showed JRuby + coro performing significantly > *better* than C Ruby. > > This is also a bit tricky to profile...since call stacks are jumping > around a bit :) A dumb sampled profile doesn't show much other than > Ruby code being hit heavily...which I'd expect. > > Lukas: Are you able to reproduce these numbers with JRuby master and > bench/bench_fiber_ring.rb? Here's the command line I'm using: > > jruby --1.9 -Xfiber.coroutines=true bench/bench_fiber_ring.rb 20 100 1000 > > - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev