RFR:8144771: AVX3 patch for MacroAssembler::string_compare
Tobias Hartmann
tobias.hartmann at oracle.com
Mon Dec 7 14:39:19 UTC 2015
Hi Jan,
the intrinsic looks good to me (not a reviewer). Here are two minor suggestions:
- The following comments are wrong:
8355 } else { //ae == StrIntrinsicNode::UL
8356 load_unsigned_short(cnt1, Address(str2, result, scale2)); // L string
8357 load_unsigned_byte(result, Address(str1, result, scale1)); // U string
The first line then loads a UTF16 (two-byte) String and the second line loads a Latin1 (one-byte) String. Maybe you should also exchange the lines to first load str1 and then load str2. I would omit the comment after "else" because ae could either be UL or LU (both have the Latin1 string in str1).
- Missing whitespace after comma:
8143 cmpl(cnt2,stride2x2);
I assume you executed the hotspot JTREG tests (including /compiler/intrinsics/string/TestStringIntrinsics.java).
Best,
Tobias
On 05.12.2015 05:07, Civlin, Jan wrote:
> We would like to contribute AVX3 patch for MacroAssembler::string_compare.
>
> This utilizes 512 bits registers on AVX3 architecture and delivers performance gain (speed-up) on long strings at about x 1.33 and on random string about x 1.22. This was measured vs AVX2 (256 bits registers).
>
>
> Contributors:
> MacroAssembler::string_compare - Jan Civlin.
> Rest of code, including all x86 AVX3 extensions - Michael Berg
>
>
> Bug-id: https://bugs.openjdk.java.net/browse/JDK-8144771
> Webrev: http://cr.openjdk.java.net/~kvn/8144771/webrev/
>
More information about the hotspot-compiler-dev
mailing list