Skip to content

Instantly share code, notes, and snippets.

@casperisfine
Last active October 24, 2024 08:17
Show Gist options
  • Save casperisfine/f3953a3af626d6cbfde2eb801a58d70c to your computer and use it in GitHub Desktop.
Save casperisfine/f3953a3af626d6cbfde2eb801a58d70c to your computer and use it in GitHub Desktop.
== Encoding citm_catalog.json (500298 bytes)
ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
json (2.7.3) 123.000 i/100ms
oj 124.000 i/100ms
Calculating -------------------------------------
json (2.7.3) 1.312k (± 1.8%) i/s (761.91 μs/i) - 6.642k in 5.062192s
oj 1.278k (± 2.0%) i/s (782.35 μs/i) - 6.448k in 5.046587s
Comparison:
json (2.7.2): 884.0 i/s
json (2.7.3): 1312.5 i/s - 1.48x faster
oj: 1278.2 i/s - 1.45x faster
== Encoding twitter.json (466906 bytes)
ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [arm64-darwin23]
Warming up --------------------------------------
json (2.7.3) 213.000 i/100ms
oj 222.000 i/100ms
Calculating -------------------------------------
json (2.7.3) 2.140k (± 2.8%) i/s (467.19 μs/i) - 10.863k in 5.079099s
oj 2.303k (± 3.2%) i/s (434.27 μs/i) - 11.544k in 5.018239s
Comparison:
json (2.7.2): 1250.5 i/s
oj: 2302.7 i/s - 1.84x faster
json (2.7.3): 2140.5 i/s - 1.71x faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment