block version of loop
no debugging, just worked! only about 10% slower, nice also recording qemu-linux times, which are a lot faster(and double bonus, save the startup/syncing)
This commit is contained in:
@ -9,3 +9,5 @@ class Space
|
||||
return b
|
||||
end
|
||||
end
|
||||
# 9.5 local
|
||||
# 45 on pi
|
||||
|
@ -3,3 +3,6 @@ class Space
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
# 5.5 local
|
||||
# 42 on pi
|
||||
|
17
test/bench/rubyx/times.rb
Normal file
17
test/bench/rubyx/times.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class Space
|
||||
def times(n)
|
||||
i = 0
|
||||
while( i < n )
|
||||
yield
|
||||
i = i + 1
|
||||
end
|
||||
return n
|
||||
end
|
||||
def main(arg)
|
||||
return times(100000) {
|
||||
return 1
|
||||
}
|
||||
end
|
||||
end
|
||||
# 13 local
|
||||
# 51 on pi
|
Reference in New Issue
Block a user