RFR 8170159 Improve the performance of BitSet traversal

Martin Buchholz martinrb at google.com
Fri Jun 15 18:05:42 UTC 2018


It took me a while to realize why you were checking tz < 63.  It's because
the shift by 64 that might occur below would be a no-op!

1301                             action.accept(i++);1302
              word &= (WORD_MASK << i);

Can we rewrite to simply flip the one bit via

word &= ~(1L << i);
action.accept(i++);

and then we can simplify the tz handling?


More information about the core-libs-dev mailing list