ruby/ext/json/generator
Watson 641136c4af
[flori/json] Does not check whether illegal utf-8 if string has ascii only.
## Before
```
$ ruby bench_json_generate.rb
Warming up --------------------------------------
                json    25.000  i/100ms
Calculating -------------------------------------
                json    250.478  (± 4.8%) i/s -      1.250k in   5.002238s
```

## After
```
$ ruby bench_json_generate.rb
Warming up --------------------------------------
                json    32.000  i/100ms
Calculating -------------------------------------
                json    360.652  (± 3.6%) i/s -      1.824k in   5.064511s
```

## Test code
```
require 'json'
require 'benchmark/ips'

obj = []

1000.times do |i|
  obj << {
    :string => "x" * 100,
    :utf8 => "あ" * 100
  }
end

Benchmark.ips do |x|
  x.report "json" do |iter|
    count = 0
    while count < iter
      JSON.generate(obj)
      count += 1
    end
  end
end
```

91a24ecac3
2019-10-14 19:54:48 +09:00
..
depend Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
extconf.rb * ext/json/**/*.rb: merge original files from upstream repository. 2016-07-14 03:48:54 +00:00
generator.c [flori/json] Does not check whether illegal utf-8 if string has ascii only. 2019-10-14 19:54:48 +09:00
generator.h Merge json-2.0.4. 2017-04-12 00:21:18 +00:00