=3D=3D ruby 1.9.2dev (2009-10-18 trunk 25393) [i386-darwin9.8.0]
Rehearsal -------------------------------------------------------------
1 thread, 1 interpreter =C2=A0 =C2=A0 4.370000 =C2=A0 0.020000 =C2=A0 4.3= 90000 ( =C2=A04.389990)
2 threads, 1 interpreter =C2=A0 =C2=A04.360000 =C2=A0 0.030000 =C2=A0 4.3= 90000 ( =C2=A04.385111)
2 threads, 2 interpreters =C2=A0 0.010000 =C2=A0 0.010000 =C2=A0 4.700000= ( =C2=A02.460661)
--------------------------------------------------- total: 13.480000sec
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0user =C2=A0 =C2=A0 system =C2=A0 =C2=
=A0 =C2=A0total =C2=A0 =C2=A0 =C2=A0 =C2=A0real
1 thread, 1 interpreter =C2=A0 =C2=A0 4.360000 =C2=A0 0.020000 =C2=A0 4.3= 80000 ( =C2=A04.376050)
2 threads, 1 interpreter =C2=A0 =C2=A04.360000 =C2=A0 0.030000 =C2=A0 4.3= 90000 ( =C2=A04.380982)
2 threads, 2 interpreters =C2=A0 0.010000 =C2=A0 0.010000 =C2=A0 4.710000= ( =C2=A02.465925)
=3D=3D jruby 1.4.0RC3 (ruby 1.8.7 patchlevel 174) (2009-10-30 1d7de2d) (J= ava
HotSpot(TM) Client VM 1.5.0_20) [i386-java]
Rehearsal ------------------------------------------------------------
1 thread, 1 interpreter =C2=A0 =C2=A06.060000 =C2=A0 0.000000 =C2=A0 6.06= 0000 ( =C2=A06.060000)
2 threads, 1 interpreter =C2=A0 7.629000 =C2=A0 0.000000 =C2=A0 7.629000 = ( =C2=A07.629000)
-------------------------------------------------- total: 13.689000sec
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 user =C2=A0 =C2=A0 system =C2=A0 =C2=A0 =C2=
=A0total =C2=A0 =C2=A0 =C2=A0 =C2=A0real
1 thread, 1 interpreter =C2=A0 =C2=A06.080000 =C2=A0 0.000000 =C2=A0 6.08= 0000 ( =C2=A06.080000)
2 threads, 1 interpreter =C2=A0 7.288000 =C2=A0 0.000000 =C2=A0 7.288000 =
( =C2=A07.288000)
JRuby benchmarking:
* Use Java 6+
Java 6 is much faster than Java 5. Java 7 is faster still in many cases.
* Pass --server if -v output says "client" VM
The Hotspot JVM has two modes: "server" and "client". The "server" VM
does runtime-profiled optimizations and can be 2x or more faster than
the "client" VM.
Results on my system (core 2 duo 2.66GHz):
ruby 1.9.2dev (2009-07-23 trunk 24248) [i386-darwin9.7.1]
Rehearsal -------------------------------------------------------------
1 thread, 1 interpreter 3.370000 0.020000 3.390000 ( 3.516261)
2 threads, 1 interpreter 3.330000 0.020000 3.350000 ( 3.412460)
2 threads, 2 interpreters 0.010000 0.000000 3.590000 ( 2.133313)
--------------------------------------------------- total: 10.330000sec
user system total real
1 thread, 1 interpreter 3.350000 0.010000 3.360000 ( 3.415410)
2 threads, 1 interpreter 3.350000 0.020000 3.370000 ( 3.423560)
2 threads, 2 interpreters 0.000000 0.010000 3.630000 ( 2.302965)
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2009-10-30 eaa9e7f) (Java
HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
Rehearsal ------------------------------------------------------------
1 thread, 1 interpreter 2.373000 0.000000 2.373000 ( 2.373000)
2 threads, 1 interpreter 1.733000 0.000000 1.733000 ( 1.733000)
--------------------------------------------------- total: 4.106000sec
user system total real
1 thread, 1 interpreter 2.145000 0.000000 2.145000 ( 2.145000)
2 threads, 1 interpreter 1.840000 0.000000 1.840000 ( 1.840000)
It would probably improve more with a longer run, but this is pretty good.
- Charlie