Request for review: 6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86
Vitaly Davidovich
vitalyd at gmail.com
Tue Jan 8 16:40:52 PST 2013
Got it, thanks.
Sent from my phone
On Jan 8, 2013 7:35 PM, "Vladimir Kozlov" <vladimir.kozlov at oracle.com>
wrote:
> On 1/8/13 4:10 PM, Vitaly Davidovich wrote:
>
>> Hi Vladimir,
>>
>> encodeArray can be made static.
>>
>> Also, what's the purpose of overflow flag? Once you detect overflow
>> can't you simply return the overflow result?
>>
>
> No, we can't just exit, we have to encode everything (write to destination
> byte[] array) up to that limit because it could exit before that. I have to
> keep original logic intact.
>
>
>> What's the key piece that allows jit to generate better code? Is it the
>> encodeArray which is nice, small, and isolated?
>>
>
> Correct. Original loop has a lot of checks, calls, several exits ('break'
> in new loop is fine) which will prevent execution of loop optimizations.
>
> Thanks,
> Vlaidmir
>
>
>> Thanks
>>
>> Sent from my phone
>>
>> On Jan 8, 2013 6:18 PM, "Vladimir Kozlov" <vladimir.kozlov at oracle.com
>> <mailto:vladimir.kozlov@**oracle.com <vladimir.kozlov at oracle.com>>>
>> wrote:
>>
>> http://cr.openjdk.java.net/~__**kvn/6896617_jdk/webrev<http://cr.openjdk.java.net/~__kvn/6896617_jdk/webrev>
>> <http://cr.openjdk.java.net/~**kvn/6896617_jdk/webrev<http://cr.openjdk.java.net/~kvn/6896617_jdk/webrev>
>> >
>>
>> Move encoding loop into separate method for which VM will use
>> intrinsic on x86. I want to get agreement on this jdk change before
>> I submit VM part.
>>
>> This gives +1.6% performance improvement on SPECjAppServer2004 on x86.
>> Note, even without intrinsic (on other platforms) JIT will produce
>> better code for this loop.
>>
>> Thanks,
>> Vladimir
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130108/445efa76/attachment.html
More information about the hotspot-compiler-dev
mailing list