Details
-
Enhancement
-
Status: Resolved
-
P4
-
Resolution: Fixed
-
9
-
b18
Description
Packing the coder and length into a long allows us to generate fewer intermediary method handles for indified String concat expressions. Theoretically close to a third less for concatenation of non-constant-String, Object and char.
Care had to be taken to ensure the JITs are as good to optimize the resulting MH, and microbenchmarks show that C2 is as good to optimize the new code. Sometimes a few instructions better, sometimes a few instructions worse.
Attached benchmark and results show that when running in interpreted mode the patch is significantly faster (the overhead of calling more combiners and methods outweigh the extra cost of unpacking coder and length), while in C1 there is a similar slowdown.
Care had to be taken to ensure the JITs are as good to optimize the resulting MH, and microbenchmarks show that C2 is as good to optimize the new code. Sometimes a few instructions better, sometimes a few instructions worse.
Attached benchmark and results show that when running in interpreted mode the patch is significantly faster (the overhead of calling more combiners and methods outweigh the extra cost of unpacking coder and length), while in C1 there is a similar slowdown.
Attachments
Issue Links
- relates to
-
JDK-8297530 java.lang.IllegalArgumentException: Negative length on strings concatenation
-
- Closed
-