summaryrefslogtreecommitdiff
path: root/jni/ruby/benchmark/bm_vm1_gc_short_with_long.rb
blob: 298dbc845b0b3dfcb3e5c423859b02a6e7841e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
long_lived = Array.new(1_000_000){|i| "#{i}"}
GC.start
GC.start
i = 0
while i<30_000_000 # while loop 1
  a = '' # short-lived String
  b = ''
  c = ''
  d = ''
  e = ''
  f = ''
  i+=1
end