Optimize basic_ostream::write by having it call sputn instead of sputc.