Project

General

Profile

Bug #10761 » marshal_slow.rb

Code that runs benchmark on Marshal.dump - jenkoruby (David Jenkins), 01/21/2015 05:12 AM

 
require 'benchmark'

class VanillaDataset
end

ds = Marshal.load(File.open('./nested_ds.txt', 'r'))

n = 100

Benchmark.bm do |x|
x.report("Marshal Dump") {for i in 1..n; Marshal.dump(ds); end}
end
(2-2/5)