The ramifications of sharing in data structures