summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-08-24 17:39:10 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-08-27 10:01:52 +0900
commit97b5df11435d60d4dcdeb9474275cfc694d43b1e (patch)
tree65de3cf0abdbd2a6fee6d2720722ebdb5780d5be /debug.c
parentf6823936fa2ebfc4372e44499237235ae17f0bd9 (diff)
[ruby/json] Optimize `fbuffer_append_str_repeat`
Helps with pretty printting performance: ``` == Encoding activitypub.json (52595 bytes) ruby 3.4.2 (2025-02-15 revision https://github.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 1.746k i/100ms Calculating ------------------------------------- after 17.481k (± 1.0%) i/s (57.20 μs/i) - 89.046k in 5.094341s Comparison: before: 16038.4 i/s after: 17481.1 i/s - 1.09x faster == Encoding citm_catalog.json (500298 bytes) ruby 3.4.2 (2025-02-15 revision https://github.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 60.000 i/100ms Calculating ------------------------------------- after 608.157 (± 2.3%) i/s (1.64 ms/i) - 3.060k in 5.034238s Comparison: before: 525.3 i/s after: 608.2 i/s - 1.16x faster == Encoding twitter.json (466906 bytes) ruby 3.4.2 (2025-02-15 revision https://github.com/ruby/json/commit/d2930f8e7a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 160.000 i/100ms Calculating ------------------------------------- after 1.606k (± 0.5%) i/s (622.70 μs/i) - 8.160k in 5.081406s Comparison: before: 1410.3 i/s after: 1605.9 i/s - 1.14x faster ``` https://github.com/ruby/json/commit/f0dda861c5
Diffstat (limited to 'debug.c')
0 files changed, 0 insertions, 0 deletions