Skip to content

Instantly share code, notes, and snippets.

View azrazalea-debtbook's full-sized avatar

Lilith Carpenter azrazalea-debtbook

View GitHub Profile
@azrazalea-debtbook
azrazalea-debtbook / open_struct_struct_hash_data.rb
Last active August 28, 2023 21:03 — forked from tristang/open_struct_struct_hash.rb
OpenStruct vs Struct vs Hash vs Data performance
require 'benchmark'
require 'ostruct'
REP = 1000000
ACCESS_REP = 4
User = Struct.new(:name, :age)
UserData = Data.define(:name, :age)