Optimizing Ruby’s JSON, Part 8 0 ▲ byroot’s blog 120 days ago · 19 min read3777 words · Tech · hide · Fediverse post It has now been about 18 months since I concluded my post series on optimising Ruby’s json. Back then, I covered interesting performance patches that happened between version 2.7.2, the last version published before I took over maintenance, and version 2.9.0, the latest release at that time. During that span, both the parser and the generator became twice as fast on the infamous twitter.json benchmark. == Parsing twitter.json (466906 bytes) ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +YJIT +PRISM [arm64-darwin25] 2.7.2 575.498 (± 2.1%) i/s (1.74 ms/i) - 2.880k in 5.004363s 2.9.0 1.109k (± 0.7%) i/s (901.86 μs/i) - 5.564k in 5.017923s Comparison: 2.7.2: 575.5 i/s 2.9.0: 1108.8 i/s - 1.93x faster == Encoding twitter.json (466906 bytes) ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +YJIT +PRISM [arm64-darwin25] 2.7.2 1.108k (± 0.9%) i/s (902.19 μs/i) - 5.635k in 5.083851s 2.9.0 2.219k (± 0.2%) i/s (450.69 μs/i) - 11.220k in 5.056759s Comparison: 2.7.2: 1108.4 i/s 2.9.0: 2218.8 i/s - 2.00x… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town