summaryrefslogtreecommitdiff
path: root/benchmark/bm_app_factorial.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_app_factorial.rb')
-rw-r--r--benchmark/bm_app_factorial.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/benchmark/bm_app_factorial.rb b/benchmark/bm_app_factorial.rb
new file mode 100644
index 0000000000..cfafd626a8
--- /dev/null
+++ b/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