Skip to content

Instantly share code, notes, and snippets.

@rubychan
Created March 7, 2011 21:31
Show Gist options
  • Save rubychan/859282 to your computer and use it in GitHub Desktop.
Save rubychan/859282 to your computer and use it in GitHub Desktop.
MacRuby vs. CodeRay benchmarks
$ macruby -wIlib bench/bench.rb ruby null 10
unknown: warning: global variable `$CODERAY_DEBUG' not initialized
user system total real
unknown: warning: instance variable @plugin_hash not initialized
CodeRay unknown: warning: instance variable @plugin_hash not initialized
unknown: warning: instance variable @file_extension not initialized
unknown: warning: instance variable @encoding not initialized
4.130000 0.200000 4.330000 ( 4.009760)
2.49 KB/s (10.0 KB) 63.23 KTok/s
user system total real
CodeRay 3.550000 0.210000 3.760000 ( 3.388620)
Segmentation fault
$ macruby -wIlib bench/bench.rb ruby null 20
unknown: warning: global variable `$CODERAY_DEBUG' not initialized
user system total real
unknown: warning: instance variable @plugin_hash not initialized
CodeRay unknown: warning: instance variable @plugin_hash not initialized
unknown: warning: instance variable @file_extension not initialized
unknown: warning: instance variable @encoding not initialized
7.750000 0.670000 8.420000 ( 7.130312)
2.80 KB/s (20.0 KB) 35.56 KTok/s
user system total real
CodeRay 7.280000 0.670000 7.950000 ( 6.661035)
/Users/murphy/ruby/coderay/bench/bench.rb:116:in `block': can't convert _RegexpMatcher into String (TypeError)
from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/1.9.2/benchmark.rb:177:in `benchmark:'
from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/1.9.2/benchmark.rb:207:in `bm:'
from /Users/murphy/ruby/coderay/bench/bench.rb:66:in `block'
from /Users/murphy/ruby/coderay/bench/bench.rb:65:in `<main>'
$ macruby -wIlib bench/bench.rb ruby null 30
unknown: warning: global variable `$CODERAY_DEBUG' not initialized
user system total real
unknown: warning: instance variable @plugin_hash not initialized
CodeRay unknown: warning: instance variable @plugin_hash not initialized
unknown: warning: instance variable @file_extension not initialized
unknown: warning: instance variable @encoding not initialized
11.270000 1.340000 12.610000 ( 9.943995)
3.02 KB/s (30.0 KB) 25.50 KTok/s
user system total real
CodeRay 10.750000 1.380000 12.130000 ( 9.396279)
3.19 KB/s (30.0 KB) 26.98 KTok/s
user system total real
CodeRay 10.790000 1.320000 12.110000 ( 9.434863)
3.18 KB/s (30.0 KB) 26.87 KTok/s
user system total real
CodeRay 10.840000 1.370000 12.210000 ( 9.374258)
Segmentation fault
$ ruby-1.9.2-p180 -wIlib bench/bench.rb ruby null 30
user system total real
CodeRay 0.030000 0.000000 0.030000 ( 0.040465)
741.38 KB/s (30.0 KB) 6265.35 KTok/s
user system total real
CodeRay 0.030000 0.000000 0.030000 ( 0.022283)
1346.33 KB/s (30.0 KB) 11377.72 KTok/s
user system total real
CodeRay 0.020000 0.000000 0.020000 ( 0.021464)
1397.71 KB/s (30.0 KB) 11811.98 KTok/s
user system total real
CodeRay 0.020000 0.000000 0.020000 ( 0.020744)
1446.20 KB/s (30.0 KB) 12221.70 KTok/s
user system total real
CodeRay 0.020000 0.000000 0.020000 ( 0.022106)
1357.09 KB/s (30.0 KB) 11468.65 KTok/s
Files created: bench/test.null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment