Experiment: perf improvements
a) Batch clearing also of array of states (booleans)
b) Removed useless clearing of keys/values while reallocating the
HashMap/Sets
c) Cometic changes
TODO: test perf improvements on JDK and non-JDK configs