On Thu, 15 Dec 2022 09:56:37 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> This PR suggests improving performance for read and write operations for the >> longer primitives in `RandomAccessFile`. >> >> These improvements would also propagate to other JDK classes relying on >> these improved `RandomAccessFile` operations. > > Per Minborg has updated the pull request incrementally with three additional > commits since the last revision: > > - Improve benchmarks > - Add benchmark > - Use Bits instead of custom code src/java.base/share/classes/java/io/RandomAccessFile.java line 1090: > 1088: buffer[0] = (byte)(v >>> 8); > 1089: write(buffer, 0, Short.BYTES); > 1090: //written += 2; I suppose the commented out //written += ... can be removed, it seems to be leftover in at least 3 methods (not your doing of course). ------------- PR: https://git.openjdk.org/jdk/pull/11644