#data-class

[ follow ]
Rubyflow
1 month ago
Ruby on Rails

Micro benchmarking value objects in Ruby: Data.define vs Struct vs OpenStruct

Struct and Data class have similar performance in creating objects, while OpenStruct is slower.
Accessing attributes in Struct and Data is faster compared to OpenStruct. [ more ]
[ Load more ]