Sha256: e033e869eb86497cfaa914cbbb58b0c954a780a06316ff9709ae58fc35f0a2b2

Contents?: true

Size: 468 Bytes

Versions: 157

Compression:

Stored size: 468 Bytes

Contents

# encoding: utf-8

$: << File.expand_path('../../../lib', __FILE__)

require 'viiite'
require 'msgpack'


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

Viiite.bm do |b|
  b.report(:strings) do
    iterations.times do
      MessagePack.unpack(data)
    end
  end

  b.report(:symbols) do
    options = {:symbolize_keys => true}
    iterations.times do
      MessagePack.unpack(data, options)
    end
  end
end

Version data entries

157 entries across 157 versions & 4 rubygems

Version Path
msgpack-1.6.0 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.6 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.5 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.4 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.3 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.2 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.1 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.5.0 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.5 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.4 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.4.pre1-java spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.3 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.3-java spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.2-java spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.2 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.1-java spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.0-java spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.4.0.pre1 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.3.3-x64-mingw32 spec/jruby/benchmarks/symbolize_keys_bm.rb
msgpack-1.3.3-x86-mingw32 spec/jruby/benchmarks/symbolize_keys_bm.rb