Use hashing to prevent recreation of elements for identical data.