Request for review: 6896617: Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() on x86 (original) (raw)

Ulf Zibis Ulf.Zibis at CoSoCo.de
Sat Jan 26 01:38:07 UTC 2013


Am 18.01.2013 19:26, schrieb Vladimir Kozlov:

Here are Hotspot changes with new jtreg test:

http://cr.openjdk.java.net/~kvn/6896617/webrev

Hi Vladimir,

additionnally instead:

6322 load_unsigned_short(tmp5, Address(src, len, Address::times_2, 0)); 6323 testl(tmp5, 0xff00); // check if Unicode char 6324 jccb(Assembler::notZero, L_copy_1_char_exit); 6325 movb(Address(dst, len, Address::times_1, 0), tmp5);

you could do something like:

6322 load_unsigned_byte(tmp5, Address(src, len, Address::times_2, 1)); 6323 jccb(Assembler::notZero, L_copy_1_char_exit); // check if ISO-8859-1 char 6324 movb(Address(dst, len, Address::times_1, 0), Address(src, len, Address::times_2, 0));

There is no need to compare against an additional constant, just check the high-byte for 0.

... and your comment // check if Unicode char is wrong, as it is always a Unicode char, so correct: // check if ISO-8859-1 char Similar for lines 6245, 6269 !

-Ulf



More information about the core-libs-dev mailing list