RFR: 8299193: Micro-optimization in Buffer

Per Minborg pminborg at openjdk.org
Thu Dec 22 09:57:49 UTC 2022


On Wed, 21 Dec 2022 12:22:33 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> It is possible to declare the field `capacity` in `java.nio.Buffer` `final`, potentially unlocking performance optimizations.

The header in this PR was not exactly reflecting the initial bug report so I have updated it accordingly toning down any immediate performance gain guarantees. That said, we should add benchmarks to the PR. I will add them.

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

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


More information about the nio-dev mailing list