JSONLogic Ruby Shiny JSON Logic

Ruby JSON Logic Benchmarks

Real performance data from automated tests across multiple Ruby versions and platforms.

Data sourced from jsonlogic_benchmarks — updated weekly via GitHub Actions.

Benchmark Mode

Choose how you want to compare the gems

All Tests — 601 official JSON Logic tests
Each gem is run against all 601 official tests from the json-logic org. Pass rate shows how many each gem can actually handle. Speed and memory are measured on each gem's own test run, so a gem that skips or fails more tests naturally appears faster. Use this to evaluate correctness.

Performance Over Time

2 benchmark runs

Dashed lines = Speed (ops/s, left axis) ยท Solid lines = Pass Rate (%, right axis)

Filter by:

Visual Comparison

json-logic-rb

v0.2.0

93.68%

pass rate

json_logic

v0.4.7

63.84%

pass rate

json_logic_ruby

v0.2.4

43.59%

pass rate

shiny_json_logic Ours

v0.3.0

100.0%

pass rate

Detailed Results

All Ruby versions All platforms
Gem Version Pass Rate Speed (ops/s) Memory (MB)

Speed and memory are averages across 12 test runs. Click column headers to sort.


Why These Benchmarks?

Ruby has several JSON Logic implementations, each with different trade-offs in compatibility, performance, and Ruby version support.

We created these benchmarks to objectively measure the strengths and weaknesses of each gem, helping developers make informed decisions based on real data rather than assumptions.

Key questions we answer: Which gem passes the most tests? Which is fastest? Which works on older Ruby versions? Which uses the least memory?

How We Measure

All benchmarks run in our open-source benchmark repository via GitHub Actions on consistent runners.

  • Pass Rate: Percentage of 601 official JSON Logic tests passed
  • Speed: Operations per second using Ruby's Benchmark module with warmup iterations
  • Memory: Peak memory usage measured via GetProcessMem

Tests run across multiple Ruby versions (2.7 to 3.4) on both Linux and macOS to ensure comprehensive coverage.

Key Insights

100% Test Compliance

shiny_json_logic is the only Ruby gem that passes all 601 official JSON Logic tests from the json-logic org.

Ruby 2.7+ Support

Unlike competitors that require Ruby 3.0+, shiny_json_logic works on Ruby 2.7, supporting legacy applications.

Official Test Suite

These benchmarks use the official tests from json-logic org , not inflated third-party test suites.

Transparent Methodology

All benchmark code is open source . Run them yourself to verify.

Ready to use the most compatible Ruby JSON Logic gem?