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