Faster::OpenStruct
Up to 40 (!) times more memory efficient version of OpenStruct
Differences from Ruby MRI OpenStruct:
Doesn't
duppassed initialization hash (NOTE: only reference to hash is stored)Doesn't convert hash keys to symbols (by default string keys are used, with fallback to symbol keys)
Creates methods on the fly on
OpenStructclass, instead of singleton class. Usesmodule_evalwith string to avoid holding scope references for every method.Refactored, crud clean, spec covered :)