in reply to Storable: where is my memory?

Why are you doing an nfreeze and immediate thaw on your data? From the docs: Note that freezing an object structure and immediately thawing it actually achieves a deep cloning of that structure.

I believe you're seeing greater memory consumption because you are creating totally distinct copies of each instance of Set::Scalar.