Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (28 sloc) 0.354 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
perf_test('while') do
  i = 0
  while i < 10000
    j = 0
    while j < 2000
      j += 1
    end
    i += 1
  end
end

perf_test('times') do
  10000.times do
    2000.times do
    end
  end
end

perf_test('for') do
  for i in 0..10000
    for j in 0..2000
    end
  end
end

perf_test('upto') do
  0.upto(10000) do
    0.upto(2000) do
    end
  end
end
Something went wrong with that request. Please try again.