so, actually: TreeSet has an overhead of 32b per entry (one tree node), whereas immutable.HashSet occupies 41b (on average at 1000000 entries; same result for 1000 entries)