3 ms·
I'd imagine not. Assuming the JVM's semantics aren't too different from those of the Java language, you always know at compile time how many arguments a functio
by Gaelan 6y ago
I'd imagine not. Assuming the JVM's semantics aren't too different from those of the Java language, you always know at compile time how many arguments a function takes[1], so this optimization wouldn't be relevant.
[1]: Java does have variadic functions, but we also know at compile time which functions have such a signature, so it probably just desugars to a normal array as the final argument.
- avereveard 6y agowell, there's also invokedynamic, but call site selection is in user space, so one can implement this optimization for it's own dynamic language without violating the JVM own static invocation rules.