Jean Boussier edebd83ea9 [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>
2025-11-03 09:58:01 +00:00
..