memory measure + faster version of ordered_hash (erase for O(1))