RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

Claes Redestad redestad at openjdk.org
Thu Aug 29 11:28:22 UTC 2024


On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen <swen at openjdk.org> wrote:

> A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more C2-friendly and improves performance.

Needs to mask with `& 0xFF` in these places, otherwise you're changing semantics.

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

Changes requested by redestad (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20748#pullrequestreview-2268433476


More information about the core-libs-dev mailing list