diff options
Diffstat (limited to 'benchmark/bm_app_factorial.rb')
-rw-r--r-- | benchmark/bm_app_factorial.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/benchmark/bm_app_factorial.rb b/benchmark/bm_app_factorial.rb index cfafd626a8..a5a5de0426 100644 --- a/benchmark/bm_app_factorial.rb +++ b/benchmark/bm_app_factorial.rb @@ -1,11 +1,11 @@ -def fact(n)
- if(n > 1)
- n * fact(n-1)
- else
- 1
- end
-end
-
-8.times{
- fact(5000)
+def fact(n) + if(n > 1) + n * fact(n-1) + else + 1 + end +end + +8.times{ + fact(5000) }
\ No newline at end of file |