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

@ -14,12 +14,12 @@ class Space
return result
end
# ran with --parfait=40000
# ran with --parfait=80000
def main(arg)
b = 1000
while( b >= 1 )
b = b - 1
fibo_i(20)
fibo_i(40)
end
return b
end

View File

@ -5,8 +5,8 @@ class Space
return n
end
a = fibo_r(n - 1)
d = fibo_r(n - 2)
return a + d
b = fibo_r(n - 2)
return a + b
end
# ran with --parfait=70000

View File

@ -1,6 +1,5 @@
class Space
# ran with --parfait=25000
# time - noop * 10 + noop
def main(arg)
b = 10000
while( b >= 1 )

11
test/bench/rubyx/loop.rb Normal file
View File

@ -0,0 +1,11 @@
class Space
# ran with --parfait=101000
def main(arg)
b = 100000
while( b >= 1 )
b = b - 1
end
return b
end
end