-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
24
-
None
Parameters are created to correct many inconsistencies with formal parameters, such as mandated or synthetic parameters that disrupt mapping of generic types/parameter annotations to the parameter indices. In addition, they are the only way to access the access flags or modifiers on parameters.
Currently, when parameters are requested, all parameter names are computed eagerly. In large applications, this causes a significant overhead, observed in the form as synthesized parameter names getting allocated repeatedly for Java programs compiled without -parameters flag. (Worse, this code is in runtime, so most likely C2 cannot optimize those allocations when they are unused).
We should consider an extra level of laziness for parameter name access - they are often time not in users' interest, yet they are consistently created and punish users who just want to get annotation or generic type offsets right. We might update parameter initialization into two passes - one for modifiers, and another for names.
Currently, when parameters are requested, all parameter names are computed eagerly. In large applications, this causes a significant overhead, observed in the form as synthesized parameter names getting allocated repeatedly for Java programs compiled without -parameters flag. (Worse, this code is in runtime, so most likely C2 cannot optimize those allocations when they are unused).
We should consider an extra level of laziness for parameter name access - they are often time not in users' interest, yet they are consistently created and punish users who just want to get annotation or generic type offsets right. We might update parameter initialization into two passes - one for modifiers, and another for names.
- relates to
-
JDK-8357728 Optimize Executable#synthesizeAllParams
-
- Open
-