This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'benchmark-ips' | |
gem 'xrb' | |
gem 'erb' | |
gem 'erubi' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require "json" | |
File.open(ARGV.first).each_line do |line| | |
if line.include?('"value":') | |
obj = JSON.parse(line) | |
obj.delete("value") | |
puts JSON.dump(obj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'activesupport', github: 'rails/rails' | |
gem 'benchmark-ips' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Parsing activitypub.json (58160 bytes) | |
ruby 3.3.5 (2024-09-03 revision ef084cc8f4) +YJIT [arm64-darwin23] | |
Warming up -------------------------------------- | |
json 2.8.0.alpha1 891.000 i/100ms | |
oj 794.000 i/100ms | |
Calculating ------------------------------------- | |
json 2.8.0.alpha1 8.879k (± 7.4%) i/s (112.62 μs/i) - 44.550k in 5.058132s | |
oj 7.916k (± 1.7%) i/s (126.32 μs/i) - 39.700k in 5.016420s | |
Comparison: |
OlderNewer