Skip to content

Instantly share code, notes, and snippets.

@dnagir
Created January 9, 2012 05:52
Show Gist options
  • Save dnagir/1581374 to your computer and use it in GitHub Desktop.
Save dnagir/1581374 to your computer and use it in GitHub Desktop.
JRuby --server & MRI call vs send
> sh run.sh
======================== JRUBY =========================
Using /Users/dnagir/.rvm/gems/jruby-1.6.5.1
jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
Benchmark for 100000 iterations
user system total real
send 0.266000 0.000000 0.266000 ( 0.266000)
call 0.069000 0.000000 0.069000 ( 0.069000)
Benchmark for 1000000 iterations
user system total real
send 0.459000 0.000000 0.459000 ( 0.459000)
call 0.119000 0.000000 0.119000 ( 0.119000)
Benchmark for 100000000 iterations
user system total real
send 19.781000 0.000000 19.781000 ( 19.780000)
call 7.154000 0.000000 7.154000 ( 7.154000)
======================== MRI =========================
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
Benchmark for 100000 iterations
user system total real
send 0.040000 0.000000 0.040000 ( 0.042031)
call 0.020000 0.000000 0.020000 ( 0.021379)
Benchmark for 1000000 iterations
user system total real
send 0.410000 0.000000 0.410000 ( 0.413018)
call 0.210000 0.000000 0.210000 ( 0.216105)
Benchmark for 100000000 iterations
user system total real
send 42.450000 0.010000 42.460000 ( 42.461048)
call 22.000000 0.000000 22.000000 ( 22.005245)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment