RFR (S) 8145428: Optimize StringUTF16 compress/copy methods for C1

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Dec 16 19:11:47 UTC 2015


Hi,

I would like to suggest a simple cleanup/improvement in current
StringUTF16, which somewhat closes the gap between C1 and C2 performance
with Compact Strings:
  https://bugs.openjdk.java.net/browse/JDK-8145428
  http://cr.openjdk.java.net/~shade/8145428/webrev.02/

It does improve the score on C1 (-client) configurations significantly,
without affecting C2 performance (because we basically modifying the
code that C2 would overthrow with vectorized intrinsic):
  http://cr.openjdk.java.net/~shade/8145428/notes.txt

...and the generated code looks much better now. It also alleviates some
performance regressions on client configurations we observed in a
regular performance testing.

The subsequent improvements may further eliminate range checks, plus
unroll/vectorize the loop, but I would like to defer that until array
comparison intrinsics are stable and exposed to both C1 and C2.

Testing: microbenchmarks, JPRT

Thanks,
-Aleksey




More information about the core-libs-dev mailing list