add simple loop bench

fiddled with run numbers a bit
recording times with noop removed
results slightly worse than hoped
This commit is contained in:
2019-07-31 21:18:03 +03:00
parent 8eb0ba0d81
commit 6b1c316f04
17 changed files with 51 additions and 33 deletions

View File

@@ -11,9 +11,9 @@ def fibo( n)
return result
end
counter = 100000
counter = 50000
while(counter > 0) do
fibo(20)
fibo(40)
counter -= 1
end

View File

@@ -1,8 +1,8 @@
counter = 100000;
counter = 10000;
while(counter > 0) do
puts "Hello there"
# roughly 4 times slower with this, which is like rubyx
#STDOUT.flush
STDOUT.flush
counter = counter - 1
end

View File

@@ -1,5 +1,5 @@
counter = 100000
counter = 1000000
while(counter > 0) do
counter = counter - 1
counter -= 1
end