2012-05-24 10:09:23 +04:00
|
|
|
def rec n
|
|
|
|
if n > 0
|
|
|
|
rec n-1
|
|
|
|
else
|
|
|
|
raise
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-05-27 18:41:01 +04:00
|
|
|
i = 0
|
2012-05-24 10:09:23 +04:00
|
|
|
while i<6_000_000 # benchmark loop 2
|
2012-10-15 16:53:12 +04:00
|
|
|
i += 1
|
2012-05-24 10:09:23 +04:00
|
|
|
|
|
|
|
begin
|
|
|
|
rec 10
|
|
|
|
rescue
|
|
|
|
# ignore
|
|
|
|
end
|
|
|
|
end
|