Hotspot appears to have support for the array filling code pattern, but
Arrays.fill itself is not intrinsified.  There are bounds checks which
hotspot may not be able to elide.  For almost all software, Arrays.fill is
good enough, but core library collections are an exception.  Also, we
introduce other little abstractions like shiftTailOverGap and
circularClear.  Another possibility is to introduce our own tiny helper
method without checks

nullOutSlice(Object[] a, int from, int to)

On Tue, Dec 13, 2016 at 5:26 PM, Paul Sandoz <[email protected]> wrote:

>
> One general question: why did you replace Arrays.fill with an explicit
> loop in many cases?
>
>

Reply via email to