Sha256: 7416ed7d1f4b034b00018899459a0a9f3def8a18194b4ed619b889abd3cc51d0

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 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(BenchOptions.output_width) do |x|
  x.report("json mri generate: #{BenchOptions.iterations}") do
    BenchOptions.iterations.times { JSON.fast_generate(hsh) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jrjackson-0.2.4 benchmarking/individual/json-gen-mri-sourced.rb