Duplicate :
|
|
Relates :
|
|
Relates :
|
Replacing a single invokestatic call with an invokedynamic call is sufficient to increase the number of compilations by 2X, the time spent in the compiler by 2-3X, and in general the time spent in the VM (when the user application is not making progress). The startup time of the VM is also likely to increase, as for a number of methods bootstrapping happen when the method is first executed during VM startup. A good example of this problem is JDK-8148940 that was triggered by the the Indify String Concatenation project (JDK-8148483). The Indify String Concatenation project changes 'javac' to generate invokedynamic calls for string concatenations (instead of "traditional" invokes") and as a result is a good example of the problem. It would be good to understand how much slowdown this problem affects VM startup time and the VM's performance in general. It would be also good to know if other invokedynamic calls sites, e.g., those generated for lambda expressions or by nashorn, suffer from the same problem.
|