Making hexdump 23 times faster (and what I've learned)

Last month I wrote hexdump from scratch and admitted I didn't know a good alternative to printf per row. I found it: one fwrite per 64 KiB chunk instead of 128 million calls into stdio, and a 23× speedup, most of it from the part I thought was boring.