diff options
| author | furunkel <[email protected]> | 2015-04-24 14:19:51 +0200 |
|---|---|---|
| committer | furunkel <[email protected]> | 2015-04-24 14:19:51 +0200 |
| commit | 8f5ec1a60ff5e93377fdfcfcf3dc141136a8660a (patch) | |
| tree | 806f232b946ae1bc69aa8fe4a06ebfa358d6fd69 /benchmark/bm_fib.rb | |
| parent | 465d7a23c89d385e1c419a7bd1546b0bf41bf097 (diff) | |
| download | mruby-8f5ec1a60ff5e93377fdfcfcf3dc141136a8660a.tar.gz mruby-8f5ec1a60ff5e93377fdfcfcf3dc141136a8660a.zip | |
Let all benchmarks start with bm_
Diffstat (limited to 'benchmark/bm_fib.rb')
| -rw-r--r-- | benchmark/bm_fib.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/benchmark/bm_fib.rb b/benchmark/bm_fib.rb new file mode 100644 index 000000000..4b395f9cc --- /dev/null +++ b/benchmark/bm_fib.rb @@ -0,0 +1,7 @@ + +def fib n + return n if n < 2 + fib(n-2) + fib(n-1) +end + +puts fib(37) |
