Skip to content

Instantly share code, notes, and snippets.

View bobzoller's full-sized avatar

Bob Zoller bobzoller

View GitHub Profile
require 'rubygems'
require 'inline'
require 'duby_inline'
require 'benchmark'
class FastMath
def factorial_ruby(n)
f = 1
n.downto(2) { |x| f *= x }
return f