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.2.5 bench/pack.rb
msgpack-1.2.4-x64-mingw32 bench/pack.rb
msgpack-1.2.4-x86-mingw32 bench/pack.rb
msgpack-1.2.4 bench/pack.rb
msgpack-1.2.3-x64-mingw32 bench/pack.rb
msgpack-1.2.3-x86-mingw32 bench/pack.rb
msgpack-1.2.3 bench/pack.rb
msgpack-1.2.2-x86-mingw32 bench/pack.rb
msgpack-1.2.2-x64-mingw32 bench/pack.rb
msgpack-1.2.2 bench/pack.rb
msgpack-1.2.0-x86-mingw32 bench/pack.rb
msgpack-1.2.0-x64-mingw32 bench/pack.rb
msgpack-1.2.0 bench/pack.rb
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/msgpack-1.1.0/bench/pack.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/msgpack-1.1.0/bench/pack.rb
msgpack-1.1.0-x64-mingw32 bench/pack.rb
msgpack-1.1.0-x86-mingw32 bench/pack.rb
msgpack-1.1.0 bench/pack.rb
msgpack-1.0.3-x86-mingw32 bench/pack.rb
msgpack-1.0.3-x64-mingw32 bench/pack.rb