ruby/ext
Watson cb3e62511c
[flori/json] Use frozen string for hash key
When use non-frozen string for hash key with `rb_hash_aset()`, it will duplicate and freeze it internally.
To avoid duplicate and freeze, this patch will give a frozen string in `rb_hash_aset()`.

```
Warming up --------------------------------------
                json    14.000  i/100ms
Calculating -------------------------------------
                json    148.844  (± 1.3%) i/s -    756.000  in   5.079969s
```

```
Warming up --------------------------------------
                json    16.000  i/100ms
Calculating -------------------------------------
                json    165.608  (± 1.8%) i/s -    832.000  in   5.025367s
```

```
require 'json'
require 'securerandom'
require 'benchmark/ips'

obj = []

1000.times do |i|
  obj << {
    "id": i,
    "uuid": SecureRandom.uuid,
    "created_at": Time.now
  }
end

json = obj.to_json

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

18292c0c1d
2020-07-01 18:47:51 +09:00
..
-test- Match the output without encoding for localized compilers 2020-06-23 15:05:44 +09:00
bigdecimal ext/bigdecimal/bigdecimal.c, ext/date/date_core.c: undef NDEBUG 2020-05-13 13:49:21 +09:00
cgi/escape sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
continuation sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
coverage compile.c: Improve branch coverage instrumentation [Bug #16967] 2020-06-20 09:28:03 +09:00
date [ruby/date] [DOC] Mentioned alternative strptime methods 2020-06-21 16:16:15 +09:00
dbm [ruby/dbm] Update dbm.gemspec 2020-06-09 20:56:15 +09:00
digest sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
etc sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
fcntl [ruby/fcntl] add F_GETPIPE_SZ and F_SETPIPE_SZ 2020-06-09 21:13:34 +09:00
fiber Update dependencies 2019-11-18 23:16:22 +09:00
fiddle [ruby/fiddle] support for very old libffi 2020-06-28 10:40:31 +09:00
gdbm sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
io Gem::Specification#date is set automatically by RubyGems.org. 2020-06-11 13:29:06 +09:00
json [flori/json] Use frozen string for hash key 2020-07-01 18:47:51 +09:00
monitor sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
nkf sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
objspace Introduce find pattern [Feature #16828] 2020-06-14 09:24:36 +09:00
openssl [ruby/openssl] Ruby/OpenSSL 2.2.0 2020-05-13 15:47:51 +09:00
pathname sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
psych Removed nonsense rubygems_version in input gemspec files 2020-06-25 15:44:56 +09:00
pty sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
racc/cparse sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
rbconfig/sizeof sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
readline sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
ripper Allow references to $$ in Ripper DSL 2020-05-29 09:41:27 +09:00
rubyvm Added depend files 2019-07-14 01:31:29 +09:00
socket Thread scheduler for light weight concurrency. 2020-05-14 22:10:55 +12:00
stringio Removed nonsense rubygems_version in input gemspec files 2020-06-25 15:44:56 +09:00
strscan sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
syslog sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
win32 Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
win32ole win32ole: separate global variable declarations and definitions 2020-05-10 21:37:59 +09:00
zlib sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
.document ext/.document: follow-up r59734 2017-09-03 13:31:34 +00:00
extmk.rb Configure static extensions only if in charge 2019-11-19 15:11:41 +09:00
Setup Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00
Setup.atheos Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00
Setup.nt Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00