review (M) for 4809552: Optimize Arrays.fill(...)
Tom Rodriguez
tom.rodriguez at Oracle.COM
Fri Aug 20 09:00:56 PDT 2010
On Aug 20, 2010, at 3:30 AM, Ulf Zibis wrote:
> Couldn't we intrinsify loops like? :
> for (int i = fromIndex; i < toIndex; i++)
> a[i] = val;
> for (int i = 0, len = a.length; i < len; i++)
> a[i] = val;
It will.
tom
>
> So all similar Java-coded loops would benefit from the performance gain of using REP STOS operation, especially in case of client compiler and maybe interpreter too.
>
> -Ulf
>
>
> Am 20.08.2010 00:11, schrieb Tom Rodriguez:
>> 4809552: Optimize Arrays.fill(...)
>> Reviewed-by:
>>
>> This adds new logic to recognize fill idioms and convert them into a
>> call to an optimized fill routine. Loop predication creates easily
>> matched loops that are simply replaced with calls to the new assembly
>> stubs. Currently only 1,2 and 4 byte primitive types are supported.
>> Objects and longs/double will be supported in a later putback. Tested
>> with runthese, nsk and ctw plus jbb2005.
>>
>> http://cr.openjdk.java.net/~never/4809552
>>
>>
>>
>
More information about the hotspot-compiler-dev
mailing list