reduce GC load by using a LongMap instead of a HashSet[Long]