On Mon, 22 Nov 2021 16:25:22 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> I could move `int max = size();` outside the loop > > But why? The initialization block of a `for` statement is exactly where you'd > put loop-scoped variables. This change significantly improves performance because the BitSet's size () method is an O (N) implementation. You may be wondering because it is O (1) in many other collections. ------------- PR: https://git.openjdk.java.net/jfx/pull/673