slow Python 3.0 write performance?

Christian Heimes lists at cheimes.de
Sat Dec 6 07:01:17 EST 2008


Istvan Albert wrote:
> A previous poster suggested that in this case the slowdown is caused
> by the new io code being written in python rather than C.

For text mode Python 3's write() method is slower than Python 2.x's 
method because all text is encoded. The slowdown is mostly caused by 
additional code for line ending detection and decoding/encoding. The new 
io library does more than the old file object

So far the new io library hasn't been optimized yet, too. Please give it 
some time and report speed issues at http://bugs.python.org/.

Christian




More information about the Python-list mailing list