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

Version Path
paquito-0.11.2 benchmark/msgpack-pooling.rb
paquito-0.11.1 benchmark/msgpack-pooling.rb
paquito-0.11.0 benchmark/msgpack-pooling.rb
paquito-0.10.0 benchmark/msgpack-pooling.rb
paquito-0.9.2 benchmark/msgpack-pooling.rb
paquito-0.9.1 benchmark/msgpack-pooling.rb
paquito-0.9.0 benchmark/msgpack-pooling.rb
paquito-0.8.0 benchmark/msgpack-pooling.rb
paquito-0.7.0 benchmark/msgpack-pooling.rb
paquito-0.6.2 benchmark/msgpack-pooling.rb
paquito-0.6.1 benchmark/msgpack-pooling.rb
paquito-0.6.0 benchmark/msgpack-pooling.rb
paquito-0.5.0 benchmark/msgpack-pooling.rb
paquito-0.4.0 benchmark/msgpack-pooling.rb