Java File Copy Benchmark Updates (once again)

Duke Java Logo

I’ve made another updates to my file copy benchmark.

First of all, I used my little utility class to automatically create the graphs. The graph are a little less clean, but I spare a lot of time not creating them myself.

Then, I’ve also made some corrections on the code :

  • I”ve used a buffer size of 8192 instead of 4096
  • I’ve made some corrections using the channels because the old code can forgot to write some portions of the file
  • I used allocateDirect() instead of allocate() for the ByteBuffer.

And I’ve added a new method using Java 7 : Path.copyTo(Path path).

So the new results are all based on a Java 7 Virtual Machine.

You’ll find all the new informations and result, on the original post : File Copy in Java – Benchmark

I hope this new informations will interest you.

Related posts:

  1. Java File Copy Benchmarks Update
  2. File copy in Java – Benchmark
  3. NIO.2 : The new Path API in Java 7
  4. My Java Benchmarks on GitHub
  5. Java 7 : Languages updates from Project Coin