memory cost of each type of Collection class
Hi, I wonder what is the memory cost of each type of Collection?
Suppose I want to keep a set of non-duplicate objects, HashSet removes duplicates automatically, but calculating hash is extra cost; instead i can use ArrayList and do a check "if contains, then adds" before adding an element. Which one is faster? And which costs less memory?
Thanks alot!

