Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move implementation classes from java.lang.constant to jdk.internal.constant #6

Draft
wants to merge 1 commit into
base: JDK-8294960-invoke
Choose a base branch
from

Conversation

cl4es
Copy link

@cl4es cl4es commented May 6, 2024

Move implementation classes from java.lang.constant to jdk.internal.constant, enabling a few improvements such as using a trusted factory methods from java.lang.invoke and java.lang.classfile. Intended as a follow-up to JDK-8294960-invoke.

Bootstrap improves from around ~693k bytecode executed to ~670k on HelloLambda. A few targetted microbenchmarks see improvements, in particular MethodTypeDescFactories.ofDescriptor:

Name                                                             (descString) Cnt     Base     Error      Test    Error  Unit  Change
MethodTypeDescFactories.ofDescriptor  (Ljava/lang/Object;Ljava/lang/String;)I   6  138,040 ±   0,728   135,811 ±  6,182 ns/op   1,02x (p = 0,056 )
MethodTypeDescFactories.ofDescriptor                                      ()V   6   12,422 ±   5,208    11,371 ±  0,202 ns/op   1,09x (p = 0,224 )
MethodTypeDescFactories.ofDescriptor ([IJLjava/lang/String;Z)Ljava/util/List;   6  200,177 ±   4,324   177,817 ± 25,360 ns/op   1,13x (p = 0,002*)
MethodTypeDescFactories.ofDescriptor                    ()[Ljava/lang/String;   6   60,531 ±   3,007    28,605 ±  8,503 ns/op   2,12x (p = 0,000*)
MethodTypeDescFactories.ofDescriptor                                 (..IIJ)V   6  279,014 ±  10,316   202,877 ±  4,435 ns/op   1,38x (p = 0,000*)
MethodTypeDescFactories.ofDescriptor                 (.....................).   6 2224,271 ± 121,582  1312,268 ± 61,346 ns/op   1,69x (p = 0,000*)
  * = significant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant