RFR: 8264762: ByteBuffer.byteOrder(BIG_ENDIAN).asXBuffer.put(Xarray) and ByteBuffer.byteOrder(nativeOrder()).asXBuffer.put(Xarray) are slow [v2]
Brian Burkhalter
bpb at openjdk.java.net
Tue Apr 27 16:22:35 UTC 2021
On Tue, 27 Apr 2021 14:58:15 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8264762: In X-Buffer use $.BYTES instead of ELEMENT_SIZE; remove useless ReadOnlyBufferException from getArray().
>
> src/java.base/share/classes/java/nio/X-Buffer.java.template line 799:
>
>> 797: if (length > limit() - pos)
>> 798: throw new BufferUnderflowException();
>> 799: int end = offset + length;
>
> Dead code?
Yep. Cremated.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3660
More information about the nio-dev
mailing list