diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-11-03 10:46:20 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-03 09:58:01 +0000 |
| commit | edebd83ea99651a47d4592f2cef12618da3a0736 (patch) | |
| tree | 55d6dc6488e06dc5ef79ce1e7ac3f0fb0e2c4d54 /doc/optparse/ruby/integer.rb | |
| parent | 35a5e5513377d0d1f13c3ab15966a5c51b24066c (diff) | |
[ruby/json] parser.c: Skip checking for escape sequences in `rstring_cache_fetch`
The caller already know if the string contains escape sequences
so this check is redundant.
Also stop calling `rstring_cache_fetch` from `json_string_unescape`
as we know it won't match anyways.
```
== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
after 122.000 i/100ms
Calculating -------------------------------------
after 1.226k (± 0.3%) i/s (815.85 μs/i) - 6.222k in 5.076282s
Comparison:
before: 1206.2 i/s
after: 1225.7 i/s - 1.02x faster
```
https://github.com/ruby/json/commit/b8cdf3282d
Co-Authored-By: Scott Myron <samyron@gmail.com>
Diffstat (limited to 'doc/optparse/ruby/integer.rb')
0 files changed, 0 insertions, 0 deletions
