Does anyone know what the performance difference is between
Java NIO vs DotNet IO performance.
Reading this question, it seems that standard Java-IO and DotNet-IO have
very similar IO performance.
What is interesting to me is that the Java guys state that mass file copying, file server based operations…etc should be a lot quicker because of access to the file channels etc in Java-NIO.
Is it possible that java.nio performance is better than DotNet System.IO.
Thanks.
as far as file copying, there shouldn’t be significant differences, no matter what platform or api you are using. the bottle neck is the disk spinning and head seeking of the hard drive. *
what needs to happen, is to move content of harddisk to some memory, then write the memory to harddisk. with traditional java io stream, there will be extra memory copies. still that’s not significant waste compared to disk speed.
this can be easily verified, FileChannel.transferTo/From cannot beat old way of input-output stream copying by much.
(*) of course, there are much faster disks now, but as long as we define disk as the next slower storage after memory, the argument holds.
(**)we could call a virtual disk a disk, which actually resides in main memory. then memory copy is the bottle neck, and the argument doesn’t hold any more.