summaryrefslogtreecommitdiff
path: root/benchmark/marshal_dump_load_integer.yml
blob: 78ebf823d25fa71749e7529bcaf17b7420cc9485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
prelude: |
  smallint_array = 1000.times.map { |x| x }
  bigint32_array = 1000.times.map { |x| x + 2**32 }
  bigint64_array = 1000.times.map { |x| x + 2**64 }

  smallint_dump = Marshal.dump(smallint_array)
  bigint32_dump = Marshal.dump(bigint32_array)
  bigint64_dump = Marshal.dump(bigint64_array)
benchmark:
  marshal_dump_integer_small: |
    Marshal.dump(smallint_array)
  marshal_dump_integer_over_32_bit: |
    Marshal.dump(bigint32_array)
  marshal_dump_integer_over_64_bit: |
    Marshal.dump(bigint64_array)
  marshal_load_integer_small: |
    Marshal.load(smallint_dump)
  marshal_load_integer_over_32_bit: |
    Marshal.load(bigint32_dump)
  marshal_load_integer_over_64_bit: |
    Marshal.load(bigint64_dump)
loop_count: 4000