On 9/19/18, 1:52 PM, Brian Burkhalter wrote:
On Sep 19, 2018, at 1:44 PM, Brian Burkhalter<brian.burkhal...@oracle.com>  
wrote:

On Sep 19, 2018, at 1:14 PM, Alan Bateman<alan.bate...@oracle.com>  wrote:

Starting out using buffered I/O is probably okay but I assume we will want to 
change this in the future to having it use memory mapped I/O beyond a certain 
threshold.
For the buffered case, could there be any performance advantage to using direct 
buffers with FileChannel and comparing running checksums of the two sources?
Don’t think this would work however as two files with differing content could 
conceivable have the same checksum however likely that might be.

I'll do some performance testing for both cases, FileChannel/direct buffer and possible checksum comparison, although, as you said, the later might not work since we need to be 100%. The probability of false positives is likely extremely low, but is not zero after all. I'll do the performance check any ways just out of curiosity. But in many cases, checksum comparison may not be faster than direct comparison, esp. in this case the API compares just two files. Checksum values would be nice if there are multiple files to compare.

Thanks,
Joe


Brian

Reply via email to