The work to rewrite the IO stack in C will solve this problem as it will probably solve most performance-related IO problems in py3k. Amaury and I have been progressing a lot, the rewrite is now a real branch in SVN at branches/io-c/. On this very issue, it is only 30% slower than 2.x, which is quite good given the layered nature of the IO stack and the fact that text IO does a lot more than in 2.x (it translates newlines and encodes the text). (actually, if I add an explicit .encode('utf8') call to the 2.x version of the script, it becomes slower than our io-c rewrite)