fat16lib vs SD standard library

fat16lib:
SdFat does not sync automatically. The cost of sync is very high and it is best to do it on a 512 byte boundary.

That's what I thought, thank you for explaining.

So I'm confused by the code in the benchmark test:

 // do write test
  uint32_t n = FILE_SIZE/sizeof(buf);
  uint32_t t = millis();
  for (uint32_t i = 0; i < n; i++) {
    if (file.write(buf, sizeof(buf)) != sizeof(buf)) {
      error("write failed");
    }
  }
  file.sync();
  t = millis() - t;

You have a 100 byte buffer and you write it 10,000 times. You never call sync() until the end of the loop. If you didn't call sync() at all would you lose the entire data file or just the last 512 bytes?