ruby/test/json
Jean Boussier 98e1c2845a [ruby/json] Refactor convert_UTF8_to_JSON to split searching and escaping code
The goal is to be able to dispatch to more optimized search implementations
without having to duplicate the escaping code.

Somehow, this is a few % faster already:

```
== Encoding activitypub.json (52595 bytes)
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
               after     2.257k i/100ms
Calculating -------------------------------------
               after     22.930k (± 1.3%) i/s   (43.61 μs/i) -    115.107k in   5.020814s

Comparison:
              before:    21604.0 i/s
               after:    22930.1 i/s - 1.06x  faster

== Encoding citm_catalog.json (500298 bytes)
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
               after   137.000 i/100ms
Calculating -------------------------------------
               after      1.397k (± 1.1%) i/s  (715.57 μs/i) -      6.987k in   5.000408s

Comparison:
              before:     1344.4 i/s
               after:     1397.5 i/s - 1.04x  faster

== Encoding twitter.json (466906 bytes)
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
               after   249.000 i/100ms
Calculating -------------------------------------
               after      2.464k (± 1.8%) i/s  (405.81 μs/i) -     12.450k in   5.054131s

Comparison:
              before:     2326.5 i/s
               after:     2464.2 i/s - 1.06x  faster
```

8fb5ae807f
2025-02-03 10:05:25 +09:00
..
fixtures [ruby/json] Resync 2024-11-05 18:00:36 +01:00
json_addition_test.rb [ruby/json] Categorize deprecated warning 2024-11-06 23:31:30 +01:00
json_coder_test.rb Introduce JSON::Coder 2025-01-28 15:41:47 +09:00
json_common_interface_test.rb [ruby/json] JSON.dump: write directly into the provided IO 2024-11-26 15:11:05 +09:00
json_encoding_test.rb Use frozen string literals 2024-10-26 18:44:15 +09:00
json_ext_parser_test.rb [ruby/json] Refactor JSON::Ext::Parser to split configuration and parsing state 2025-01-14 09:08:02 +01:00
json_fixtures_test.rb [ruby/json] Refactor JSONFixturesTest 2025-01-16 09:01:11 +09:00
json_generator_test.rb [ruby/json] Refactor convert_UTF8_to_JSON to split searching and escaping code 2025-02-03 10:05:25 +09:00
json_generic_object_test.rb Refactor to omit JSON::GenericObject tests 2025-01-08 17:12:19 +09:00
json_parser_test.rb [ruby/json] Reject invalid number: - -.1 -e0 2025-01-20 14:20:55 +01:00
json_string_matching_test.rb Use frozen string literals 2024-10-26 18:44:15 +09:00
ractor_test.rb json_pure: fix ractor compatibility 2024-10-26 18:44:15 +09:00
test_helper.rb [ruby/json] Appease ruby/ruby CI 2024-11-05 18:00:36 +01:00