Skip to main content

Question about the performance of Arrays.fill(boolean[] a, boolean val)

1 reply [Last post]
Joined: 2007-10-09

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-01-07

At least the server-compiler will unroll this loop.

I also played arround with some manual unrolling some time ago, and some other low-level optimizations coded directly by hand but this only confused hotspot - and made the code actually run slower! So don't worry ... hotspot (the jit-compiler used/included in Sun-Java) will do absolute fine in these situations ^^

lg Clemens