My algorithm use a huge array of boolean, and as I was taught, it take 1 byte for each boolean variable. Is there anyway to declare a boolean array and reduce the memory usage, because I’m working on phone environment.
EDIT: My friend and I are discussing if BitSet is slower than normal Boolean array. Please clarify this. The algorithm still needs performance as best demand.
BitSet
Link to benchmark between using
booleanversusBitSet