Java.util.BitSet VS java.util.EnumSet in terms of performance and memory
800151Oct 18 2011 — edited Oct 19 2011Hi,
I am working on a optimization, we are currently evaluating to use either BitSet or EnumSet.
Has somebody encountered performance measuring between those types in terms of performance and memory?
I guess for example the method "isEmpty" of a EnumSet is much faster then programmatically testing if a BitSet is empty.
But in terms of internal memory consumption, is there any advice on those types? Is an EnumSet actually internally representated as BitSet?
Thanks
Sebastian