summaryrefslogtreecommitdiff
path: root/jni/ruby/benchmark/bm_vm1_gc_short_with_symbol.rb
blob: 6b15c1b7bfe05a5f2cc4e9ae3a89972400974894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# make many symbols
50_000.times{|i| sym = "sym#{i}".to_sym}
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