RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long
Claes Redestad
redestad at openjdk.org
Thu Aug 29 12:44:19 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.
Ok, I did some adhoc testing to convince me that these are equivalent for these cases. Masking in line with intended semantics doesn't add any real runtime cost, though, it's mainly a declaration of intent, but if you prefer it like this then go ahead.
-------------
Marked as reviewed by redestad (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20748#pullrequestreview-2268614060
More information about the core-libs-dev
mailing list