optimize hot paths of putc with manual shrink-wrapping

this is the analog of commit dd8f02b7dce53d6b1c4282439f1636a2d63bee01,
but for putc.
3 files changed