ruby/benchmark/bm_vm1_length.rb

10 строки
100 B
Ruby

a = 'abc'
b = [1, 2, 3]
i = 0
while i<30_000_000 # while loop 1
i += 1
a.length
b.length
end