aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/bm_app_factorial.rb
blob: 45f471dfdb84dec0a69d384b0409c7765ee639ee (plain)
1
2
3
4
5
6
7
8
9
10
11
def fact(n)
  if(n > 1)
    n * fact(n-1)
  else
    1
  end
end

100.times {
  fact(5000)
}