Sha256: e7188c54d7d228c5ec250c061b282fd01983d93700a7b6fe158a5e5db46687f1

Contents?: true

Size: 223 Bytes

Versions: 5

Compression:

Stored size: 223 Bytes

Contents

require 'rubygems'
require 'figure_set'
require 'benchmark/ips'

fs = FigureSet.new((0..100000).to_a)

Benchmark.ips do |x|
  x.report("smaple") { fs.sample }
  x.report("array sample") { fs.to_a.sample }

  x.compare!
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
figure_set-1.1.0 benchmark/sample_benchmark.rb
figure_set-1.0.1 benchmark/sample_benchmark.rb
figure_set-1.0.0 benchmark/sample_benchmark.rb
figure_set-0.0.4 benchmark/sample_benchmark.rb
figure_set-0.0.3 benchmark/sample_benchmark.rb