2 ms·
> Converting an array of Java Objects to an array of Java interfaces doesn't require anything at runtime. It potentially costs every time you put something int
by barrkel 15y ago
> Converting an array of Java Objects to an array of Java interfaces doesn't require anything at runtime.
It potentially costs every time you put something into the array - Java arrays are covariant. Either a runtime check is needed, or the JIT compiler will have to create a proof that any particular array access is to a consistently typed array.