Clemens Eisserer wrote:
:
PS: The striding+GetPrimitive... is even used by NIO for copying
java-arrays into direct-ByteBuffers:
while (length 0) {
size = (length MBYTE ? MBYTE : length);
GETCRITICAL(bytes, env, dst);
memcpy(bytes + dstPos, (void *)srcAddr, size);
Is it still necessary for the core Java classes such as java.lang.Integer
to be declared final? I understand that may have been necessary in the
early days for performance reasons, but modern JVMs no longer provide much
of a performance benefit for final classes. For certain applications it
I guess you're right. It is probably as likely that the JIT will optimize
away the null check as it is that it will optimize away the
NullPointerException check. One exception, though, is when production
systems run using -Xverify:none. In such a case, wouldn't my approach run
faster?
I still
Clemens Eisserer a écrit :
Hi cowwoc,
I guess you're right. It is probably as likely that the JIT will optimize
away the null check as it is that it will optimize away the
NullPointerException check. One exception, though, is when production
systems run using -Xverify:none. In such a case,