-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
21
-
Cause Known
MethodHandles.arrayConstructor calls asType on a trusted method handle that's known to return instances of the array type. We can swap the asType() call with viewAsType(type, false) for better creation performance. In addition, it can probably be cached like other array element accessors; in JDK 20 its creation performance is 61ns/op (tested with String[]), while the cached int[] element accessors are created at 1.5ms/op.
- links to
-
Review openjdk/jdk/13819