Project

General

Profile

Bug #13941 ยป bench.rb

Benchmarking script - graywolf (Gray Wolf), 09/26/2017 12:10 AM

 
1
#!/usr/bin/env ruby
2

    
3
require 'benchmark'
4

    
5
Benchmark.bmbm(10) do |x|
6
  x.report('File.exist?:') do
7
    (1..100000).each { File.exist?('/etc/hosts') }
8
  end
9
end