> If the given Path represents a file, use the overload of read defined > in FileChannel that accepts an explicit position and avoid serializing > reads. > > Note: The underlying NIO implementation is not required to implement > FileChannel.read(ByteBuffer, long) concurrently; Windows still appears > to lock, as it returns true for NativeDispatcher.needsPositionLock. > > > On MacOS X, the enclosed benchmark improves from: > > > Benchmark Mode Cnt Score Error Units > ZipFileSystemBenchmark.read avgt 10 75.311 ? 3.301 ms/op > > > To: > > > Benchmark Mode Cnt Score Error Units > ZipFileSystemBenchmark.read avgt 10 12.520 ? 0.875 ms/op
Jason Zaugg has updated the pull request incrementally with one additional commit since the last revision: Use pattern matching instanceof ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3853/files - new: https://git.openjdk.java.net/jdk/pull/3853/files/b7b6f9a8..0859d2d6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3853&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3853&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/3853.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3853/head:pull/3853 PR: https://git.openjdk.java.net/jdk/pull/3853