title: Is rsync really any faster on files that have changed?
body: <p>Why can't I trust rsync to be minimally as fast as cp?  (I'm ignoring negligible differences for overhead.)</p>
  
  <p>It seems to me like rsync is fairly slow on files with no content difference, but a changed timestamp.</p>
  
  <p>If I make a file:  cp -a testfile-100M destfile</p>
  
  <p>And then I rsync them, I get what you would expect:</p>
  
  <p>$ rsync -av testfile-100M destfile
  sending incremental file list</p>
  
  <p>sent 56 bytes received 12 bytes 8.00 bytes/sec
  total size is 104857600 speedup is 1542023.53</p>
  
  <p>But that's just because rsync is checking the size and the timestamp and skipping the file.  What if I just change the timestamp?</p>
  
  <p>$ touch testfile-100M</p>
  
  <p>$ rsync -av testfile-100M destfile sending incremental file list
  testfile-100M</p>
  
  <p>sent 104870495 bytes received 31 bytes 113804.15 bytes/sec
  total size is 104857600 speedup is 1.00</p>
  
  <p>Also note that even though the speedup is 1, the inital copy took about 1/4 the time to complete than the final rsync, even though the contents are exactly the same.  So what's going on here?  Is it just all the overhead of doing the comparisons?</p>
  
  <p>If that's the case, then when does rsync ever provide a performance advantage?  Only when files are exactly the same on both sides?</p>