RFR: 8299982: (bf) Buffer.checkIndex(int, int) should use Objects.checkIndex(int, int)

Uwe Schindler uschindler at openjdk.org
Tue Jan 24 23:36:02 UTC 2023


On Tue, 24 Jan 2023 22:07:51 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Replace explicit check of indexes in `Buffer::checkIndex(int,int)` with a call to `Objects::checkIndex(int,int)` in order to improve the throughput of other methods which invoke `Buffer::checkIndex(int,int)`.

Marked as reviewed by uschindler (Author).

Looks fine to me. Benchmarks look fine. We were already wondering why ByteBuffer behaved not so well in the Panama benchmark.

-------------

PR: https://git.openjdk.org/jdk/pull/12174


More information about the nio-dev mailing list