redid the old benchmarks
With #26 out of the way, was able to get meaningful rubyx benchmarks. Meaning loops large enough for the exec time to go significantly over the noop. Did mruby too and as expected got much lower noop
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
class Space
|
||||
|
||||
def fibo_i(fib)
|
||||
a = 0
|
||||
b = fib
|
||||
while( a < b )
|
||||
a = a + 1
|
||||
b = b - 1
|
||||
end
|
||||
return a
|
||||
end
|
||||
|
||||
# ran with --parfait=100000
|
||||
# (time - noop) * 25 + noop
|
||||
def main(arg)
|
||||
b = 4000
|
||||
while( b >= 1 )
|
||||
b = b - 1
|
||||
fibo_i(20)
|
||||
end
|
||||
return b
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,27 @@
|
||||
class Space
|
||||
|
||||
def fibo_r(fib)
|
||||
n = fib
|
||||
a = 0
|
||||
b = 1
|
||||
i = 1
|
||||
while( i < n )
|
||||
result = a + b
|
||||
a = b
|
||||
b = result
|
||||
i = i + 1
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
# ran with --parfait=80000
|
||||
# (time - noop) * 50 + noop
|
||||
def main(arg)
|
||||
b = 2000
|
||||
while( b >= 1 )
|
||||
b = b - 1
|
||||
fibo_r(20)
|
||||
end
|
||||
return b
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,8 @@
|
||||
class Space
|
||||
# ran with --parfait=25000
|
||||
# time - noop * 10 + noop
|
||||
def main(arg)
|
||||
b = 2*1000
|
||||
b = 10000
|
||||
while( b >= 1 )
|
||||
b = b - 1
|
||||
"Hello-there\n".putstring
|
||||
|
||||
Reference in New Issue
Block a user