3 comments

[ 4.0 ms ] story [ 28.7 ms ] thread
It isn't mentioned here, but hashes are a big win in terms of memory savings. The hash representation for small hashes is very efficient compared to keeping top level keys. You can get savings of around 25% by moving data into hashes with five fields, instead of having 5*n keys. It's made me drastically reconsider how I've been using Ohm, because now I want to encode my models into hashes.
Not just 25% of memory saved, the same data will use just 25% of the memory needed before hashes.