Sha256: 944ff7c801bb4fdce8172916d0ec78cd12e009a9afe99a126776ef06fe9515aa
Contents?: true
Size: 671 Bytes
Versions: 13
Compression:
Stored size: 671 Bytes
Contents
#!/usr/bin/env ruby require 'benchmark' FILE = '/Users/csw/maf/chr22.maf' Benchmark.bm do |x| x.report("8k") do File.open(FILE) do |f| while true r = f.read(8192) break unless r end end end x.report("128k") do File.open(FILE) do |f| while true r = f.read(128 * 1024) break unless r end end end x.report("1M") do File.open(FILE) do |f| while true r = f.read(1024 * 1024) break unless r end end end x.report("8M") do File.open(FILE) do |f| while true r = f.read(8 * 1024 * 1024) break unless r end end end end
Version data entries
13 entries across 13 versions & 1 rubygems