# class_vs_struct.cr require "benchmark" require "json" TEXT = %({"muffin": false}) Benchmark.ips do |x| x.report("json parse") { json = JSON.parse(TEXT) } x.report("from json") { json = Hash(String, Bool).from_json(TEXT) } end