println!
is notoriously one of the less performant parts of rust, both in terms of runtime and memory usage.
It would be interesting to see an example that used String and write_all
directly, as well as possibly one that uses fixed size byte buffers.