Sha256: 00e50ae9de62733c45958341d073e77a5655bef36a974dcb49b78215a626bd35
Contents?: true
Size: 512 Bytes
Versions: 14
Compression:
Stored size: 512 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require "bundler/setup" require "paquito" require "benchmark/ips" BASELINE = Paquito::CodecFactory.build([Symbol], pool: false) POOLED = Paquito::CodecFactory.build([Symbol], pool: 1) PAYLOAD = BASELINE.dump(:foo) MARSHAL_PAYLOAD = Marshal.dump(:foo) Benchmark.ips do |x| x.report("marshal") { Marshal.load(MARSHAL_PAYLOAD) } x.report("msgpack") { BASELINE.load(PAYLOAD) } x.report("pooled") { POOLED.load(PAYLOAD) } x.compare!(order: :baseline) end
Version data entries
14 entries across 14 versions & 1 rubygems