optimize hot paths of putc with manual shrink-wrapping