JDK-8164044 : Generate corresponding simple DelegatingMethodHandles when generating a DirectMethodHandle at link time
Type:Sub-task
Component:core-libs
Sub-Component:java.lang.invoke
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2016-08-15
Updated:2016-08-25
Resolved:2016-08-18
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Generating simple rebind and delegate forms of all the DirectMethodHandles is one way to further reduce the number of classes we generate at runtime.
Comments
Internal review and comments led to a bit of redesign, but also picking up some additional delegating MHs:
http://cr.openjdk.java.net/~redestad/8164044/webrev.02
This reduces generated classes by 11, adds 2 static, reduces executed bytecodes further (~60K) and still maintain ~10ms improvement on total execution time (at least part of the improvement here is due to JIT threshold effects during bootstrap)
17-08-2016
First webrev (pending tests): http://cr.openjdk.java.net/~redestad/8164044/webrev.01/index.html
In a test which simply exercise a string concatenation:
public static void main(String ... args) throws Exception {
System.out.println("Concat: " + args.length);
}
The effect is a reduction in number of classes generated by 8, a reduction in executed bytecodes by 43K and a ~10ms improvement on total execution time.