Sha256: 000c5f6aabeda94967703eaa4b6d1a04cd6df096085ba0d00108969d7fc72f74

Contents?: true

Size: 545 Bytes

Versions: 106

Compression:

Stored size: 545 Bytes

Contents

require 'viiite'
require 'msgpack'

data = { 'hello' => 'world', 'nested' => ['structure', {value: 42}] }
data_sym = { hello: 'world', nested: ['structure', {value: 42}] }

data = MessagePack.pack(:hello => 'world', :nested => ['structure', {:value => 42}])

Viiite.bench do |b|
  b.range_over([10_000, 100_000, 1000_000], :runs) do |runs|
    b.report(:strings) do
      runs.times do
        MessagePack.pack(data)
      end
    end

    b.report(:symbols) do
      runs.times do
        MessagePack.pack(data_sym)
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 3 rubygems

Version Path
msgpack-1.5.3 bench/pack.rb
msgpack-1.5.2 bench/pack.rb
msgpack-1.5.1 bench/pack.rb
msgpack-1.5.0 bench/pack.rb
msgpack-1.4.5 bench/pack.rb
msgpack-1.4.4 bench/pack.rb
msgpack-1.4.3 bench/pack.rb
msgpack-1.4.2 bench/pack.rb
msgpack-1.4.0.pre1 bench/pack.rb
msgpack-1.3.3-x64-mingw32 bench/pack.rb
msgpack-1.3.3-x86-mingw32 bench/pack.rb
msgpack-1.3.3 bench/pack.rb
msgpack-1.3.2-x64-mingw32 bench/pack.rb
msgpack-1.3.2-x86-mingw32 bench/pack.rb
msgpack-1.3.2 bench/pack.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/msgpack-1.3.1/bench/pack.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/msgpack-1.3.1/bench/pack.rb
msgpack-1.3.1-x64-mingw32 bench/pack.rb
msgpack-1.3.1-x86-mingw32 bench/pack.rb
msgpack-1.3.1 bench/pack.rb