blob: 97c5cef045b9f566a0cf2f78637931314e68dc50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#
#
#
require 'benchmark'
require 'rbconfig'
$rubybin = ENV['RUBY'] || RbConfig.ruby
def runfile file
puts file
file = File.join(File.dirname($0), 'contrib', file)
Benchmark.bm{|x|
x.report('ruby'){
system("#{$rubybin} #{file}")
}
x.report('yarv'){
system("#{$rubybin} -rite -I.. #{file}")
}
}
end
ARGV.each{|file|
runfile file
}
|