Request for reviews (L): 6761600: Use SSE 4.2 In STTNI Intrinsics

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Fri Feb 6 17:34:04 PST 2009


On Feb 6, 2009, at 5:07 PM, Changpeng Fang wrote:

> Tom Rodriguez wrote:
>> The string_indexOf triggering criteria in library_call.cpp seems  
>> wrong since it skips the optimization for constant strings in  
>> preference for the SSE4.2 version.  The constant string seems like  
>> it should be preferred shouldn't it?
>>
> I doubt about the constant string optimizations. I experiments on  
> simple case  shows  even  though
> both strings are constant, SSE4.2 version still performs better (It  
> should not be the case). As a result,
> constant string optimizations for indexof may not be performed as  
> expected.
>
> Would you please point out where is this constant optimization?  
> Thanks,

It's the existing LibraryCallKit::inline_string_indexOf  
implementation.  It's only used if the argument is a constant string.   
If you've benchmarked it and it's always faster to use the SSE4.2  
version that's fine.

tom

>
>
> Changpeng.




More information about the hotspot-compiler-dev mailing list