Hi, I'm wondering why moving the increment operation to an extra line wound enhance performance. To prevent others from redoing the change later, I think a comment is needed.
-Ulf Am 16.12.2015 um 20:11 schrieb Aleksey Shipilev:
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