summaryrefslogtreecommitdiff
path: root/benchmark/vm1_gc_short_with_complex_long.yml
blob: 2a3ba2f0c8f8861bee119bd4e7c966dd78896c4e (plain)
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
benchmark:
  vm1_gc_short_with_complex_long: |
    def nested_hash h, n
      if n == 0
        ''
      else
        10.times{
          h[Object.new] = nested_hash(h, n-1)
        }
      end
    end

    long_lived = Hash.new
    nested_hash long_lived, 6

    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
loop_count: 1