-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
-
None
Method handle combinator lambda forms are specialized to basic type (I J F D Object) and arity.
Even with sharing and caching, this creates order of 10k lambda forms.
With enhanced box/autobox elimination, we can erase all types to Object, probably decreasing lambda form count by 5x or more.
Additionally, with array explosion and copy elimination, we can consolidate multiple arities into single lambda forms per combinator, another count reduction of 3x or more.
To avoid performance problems, these reductions require robust optimizations like the following:
for all int x; assert_static(Integer.valueOf(x).intValue() == x);
for all Integer y; assert_static(Integer.valueOf(y.intValue) == y usually);
and similarly for arrays
for all Object[] a; assert_static(a[i] == a.clone()[i]);
etc.
Also, to avoid profile pollution (and bad performance) bytecode-driven profiling (into Java-visible counters) is needed.
Even with sharing and caching, this creates order of 10k lambda forms.
With enhanced box/autobox elimination, we can erase all types to Object, probably decreasing lambda form count by 5x or more.
Additionally, with array explosion and copy elimination, we can consolidate multiple arities into single lambda forms per combinator, another count reduction of 3x or more.
To avoid performance problems, these reductions require robust optimizations like the following:
for all int x; assert_static(Integer.valueOf(x).intValue() == x);
for all Integer y; assert_static(Integer.valueOf(y.intValue) == y usually);
and similarly for arrays
for all Object[] a; assert_static(a[i] == a.clone()[i]);
etc.
Also, to avoid profile pollution (and bad performance) bytecode-driven profiling (into Java-visible counters) is needed.
- is blocked by
-
JDK-8012974 Add experimental feature to eliminate non-escaping boxing objects
- Open