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