Skip to content

Instantly share code, notes, and snippets.

@oneup
Created July 19, 2009 12:11
Show Gist options
  • Save oneup/149899 to your computer and use it in GitHub Desktop.
Save oneup/149899 to your computer and use it in GitHub Desktop.
require 'benchmark'
Benchmark.bm do |bm|
bm.report('ruby:') do
100000.times { 8.factorial }
end
bm.report('c:') do
100000.times { CFactorial.factorial(8) }
end
end #http://www.rubyinside.com/advent2006/6-rubyslum.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment