dd vs cat for writing disk images

Usually you would use the dd command to copy a disk image to an SD card and then tune the bs parameter for speed. But it might be that cat is faster, simply like this:

cat  >/dev/

Let's see if this is true.

SD card writing tests with a 30G image:

$ time dd if=rpi_debian.img of=/dev/sde bs=1M
real    32m23.274s

$ time dd if=rpi_debian.img of=/dev/sde bs=10M
real    32m16.737s

$ time dd if=rpi_debian.img of=/dev/sde bs=100M
real    32m17.373s

$ time cat rpi_debian.img >/dev/sde
real    11m56.924s

SD card reading tests with a 30G card:

$ time dd if=/dev/sde of=rpi.img bs=1M

$ time dd if=/dev/sde of=rpi.img bs=10M
real    27m9.273s

$ time dd if=/dev/sde of=rpi.img bs=100M
real    27m22.742s

# time cat /dev/sde >rpi.img
real    26m1.219s
Proxy Information
Original URL
gemini://callistix.srht.site/tipsandtricks/ddvscat.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
196.164853 milliseconds
Gemini-to-HTML Time
0.314811 milliseconds

This content has been proxied by September (ba2dc).