The faster way to write to an SD card

I would say it's a hair faster writting the data in a buffered (string) manner. Altough how fast it depends on when the library actually updates the data on the physical media (SD card).

Unlike EEPROMs, SD cards and any other kind of "mass storage device" works by reading/writting data in blocks; usually with a size multiple of 512 bytes. In case of an Arduino, data isn't actually written until one of the following happens:

  • You call either File.close() or File.flush().
  • You surpassed the 512-bytes block boundary (this implies updating the current block and reading the next one, plus some filesystem overhead). This ocurrs automatically, as in code you don't have to worry about it; but still it's important to know because this is the reason why some write attemps might be a bit slower than others (data rate is inconsistent if you don't work in blocks multiple of 512).

In summary: it's a hair faster writting as a string; but if timing is important, you might perceive inconsistent data rates due to block boundaries.