Consider implementing special invoker for MH.invokeWithArguments().
Right now, new invoker is created on every invocation.
src/java.base/share/classes/java/lang/invoke/MethodHandle.java:
public Object invokeWithArguments(Object... arguments) throws Throwable {
MethodType invocationType = MethodType.genericMethodType(arguments == null ? 0 : arguments.length);
return invocationType.invokers().spreadInvoker(0).invokeExact(asType(invocationType), arguments);
}
It's still fast (only 5x slower than a direct call) because LambdaForm caching saves lots of work in spreadInvoker(0) case.