diff options
Diffstat (limited to 'jni/ruby/benchmark/bm_app_factorial.rb')
-rw-r--r-- | jni/ruby/benchmark/bm_app_factorial.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jni/ruby/benchmark/bm_app_factorial.rb b/jni/ruby/benchmark/bm_app_factorial.rb new file mode 100644 index 0000000..45f471d --- /dev/null +++ b/jni/ruby/benchmark/bm_app_factorial.rb @@ -0,0 +1,11 @@ +def fact(n) + if(n > 1) + n * fact(n-1) + else + 1 + end +end + +100.times { + fact(5000) +} |