I have suffered about JumboEnumSet, but did not find much information about.
when and why do we use JumboEnumSet.Please can anyone explain about JumboEnumSet?
I have suffered about JumboEnumSet, but did not find much information about. when and
Share
You don’t need to use it explicitly – it’s just an implementation detail. Basically, when an enum is small,
EnumSetcan use a very efficient representation of the enum as a singleintorlong(I forget which) with one bit per member. When it has more elements than that representation allows,JumboEnumSetis used instead.You don’t need to worry about this – just use the members on
EnumSetand you’ll be fine. Just be aware that if your enums go over a certain size, then enum sets become more expensive and less efficient.