If you are dealing with ESP8266 WiFi module you’ve probably noticed, that flashing its 512K firmware takes quite some time. Actually esptool takes about 53 seconds with all its bells and whistles. Deomid Ryabkov decided to look at transfer baud rates and experiment with it in order to find fastest doable flashing option.
He started to go up gradually with baud rates and with 460k he was able to achieve over 17s flashing time. But he still wasn’t satisfied with the result. Various serial to USB adapters (FT232R) can support high baud rates like 3000000 and even higher (PL2303). The problem was how to make ESP USART to pick higher baud rates than 921600. He ended up by writing his custom flasher stub snippet which reads and writes flash contents via serial interface. By setting baud to 4000000 he was able to squeeze into 5 second limit. He modified esptool which handles all operations including MD5 digest. He says that with write optimization instead writing whole image time could be reduced to just 2 seconds. Anyway this is a hack which should be used with caution.