Skip to content

Instantly share code, notes, and snippets.

@mohnish
Last active February 27, 2016 00:59
Show Gist options
  • Select an option

  • Save mohnish/fc07720081b904a5b713 to your computer and use it in GitHub Desktop.

Select an option

Save mohnish/fc07720081b904a5b713 to your computer and use it in GitHub Desktop.
base benchmark file
require 'benchmark/ips'
Benchmark.ips do |x|
x.config(time: 5, warmup: 2)
x.report('foo') do |times|
end
x.report('bar') do |times|
end
x.compare!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment