Relates :
|
When creating VarHandles and in a few other places we call VarHandle.AccessMode/-Type.values().length. This cause cloning of the underlying array, only to discard it. An optimizing compiler would of course shortcut this, but these calls mostly happen during startup of applications. To reduce startup/warmup overheads of using VarHandles (which will be more crucial with JDK-8267277) it makes sense to introduce a constant value equal to values().length.
|