Sha256: 954af35e129e4b0bf38d24007da7e43e613ffe56f0912f01c82674de6060871c

Contents?: true

Size: 517 Bytes

Versions: 3

Compression:

Stored size: 517 Bytes

Contents

require 'bigdecimal'
require 'benchmark'
require 'gson'

require File.expand_path('lib/jrjackson')
require File.expand_path('benchmarking/fixtures/bench_options')

filename = File.expand_path(BenchOptions.source)
hsh = JrJackson::Json.load(File.read(filename), use_bigdecimal: false, symbolize_keys: true)

Benchmark.bmbm("jackson parse symbol + bigdecimal:  ".size) do |x|
  x.report("gson generate: #{BenchOptions.iterations}") do
    BenchOptions.iterations.times { ::Gson::Encoder.new({}).encode(hsh) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jrjackson-0.2.3 benchmarking/individual/gson-gen-jr-sourced.rb
jrjackson-0.2.2 benchmarking/individual/gson-gen-jr-sourced.rb
jrjackson-0.2.1 benchmarking/individual/gson-gen-jr-sourced.rb