Sha256: 62c5fe6ae76d2c430c813924a871b278a5dad31d9340c1ea716c502359257492

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

require 'benchmark'
require 'json'
require 'json/ext'

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

filename = File.expand_path(BenchOptions.source)

JSON.parser = JSON::Ext::Parser
hsh = JSON.parse(File.read(filename))

Benchmark.bmbm("jackson parse symbol + bigdecimal:  ".size) do |x|
  x.report("json mri generate: #{BenchOptions.iterations}") do
    BenchOptions.iterations.times { JSON.fast_generate(hsh) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jrjackson-0.2.3 benchmarking/individual/json-gen-mri-sourced.rb
jrjackson-0.2.2 benchmarking/individual/json-gen-mri-sourced.rb
jrjackson-0.2.1 benchmarking/individual/json-gen-mri-sourced.rb