diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-06-17 16:07:53 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-06-17 16:07:53 -0700 |
commit | 5aa786acab076b1cec48f8a2ddf418dee2a58b70 (patch) | |
tree | 1df7d1b0d72f37ee35dbe22b890095e2a45ccc95 /lib | |
parent | 569b650532e0ef3eab0b29f43cb2c47f47577b9d (diff) | |
download | ffi-yajl-5aa786acab076b1cec48f8a2ddf418dee2a58b70.tar.gz |
add JSON.fast_generate benchmark0.2.0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ffi_yajl/benchmark/encode.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ffi_yajl/benchmark/encode.rb b/lib/ffi_yajl/benchmark/encode.rb index e0fb390..d3f969c 100644 --- a/lib/ffi_yajl/benchmark/encode.rb +++ b/lib/ffi_yajl/benchmark/encode.rb @@ -101,6 +101,11 @@ module FFI_Yajl JSON.generate(hash) } } + x.report("JSON.fast_generate") { + times.times { + JSON.fast_generate(hash) + } + } end if defined?(Psych) x.report("Psych.to_json") { |