Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (21 sloc) 0.53 kb
9c1d230 committing experimental branch content
Laurent Sansonetti authored
1 def bench(e, options)
2 puts e
002ed5d now compile some of the VM primitives into bitcode that will be added…
Laurent Sansonetti authored
3 ['./miniruby', 'ruby1.9'].each do |r|
9c1d230 committing experimental branch content
Laurent Sansonetti authored
4 puts `#{r} -v`.strip
5 line = File.exist?(e) ? "#{r} \"#{e}\"" : "#{r} -e \"#{e}\""
6 n = options.include?('--no-rehearsal') ? 1 : 3
7 n.times do
8 t = Time.now
9 v = system(line) ? Time.now - t : nil
10 puts ' ' + v.to_s
11 end
12 end
13 end
14 options = []
15 expressions = []
16 while e = ARGV.shift
17 a = /^-/.match(e) ? options : expressions
18 a << e
19 end
20 expressions.map! { |e| e.gsub(/"/, '\"') }
21 expressions.each { |e| bench(e, options) }
Something went wrong with that request. Please try again.