2 ms·
Out of curiosity I did the same thing in Ruby for comparison. N = 1E6.to_int N.times { |i| puts "x#{i} = #{i}" } Then running it with: time ruby big
by tristor 7y ago
Out of curiosity I did the same thing in Ruby for comparison.
N = 1E6.to_int
N.times { |i| puts "x#{i} = #{i}" }
Then running it with:
time ruby big.rb
It never completed, because it allocates variables on stack.
Traceback (most recent call last):
big.rb: stack level too deep (SystemStackError)
ruby big.rb 1451.52s user 23.74s system 97% cpu 25:08.23 total