Yet another Python vs. Perl speed issue/question

nanotech at europa.com nanotech at europa.com
Tue Mar 13 23:17:49 CET 2001


All:

Python 2.0 on an HP (nice and big) takes ~30 seconds to lowercase all 
the lines in a 3meg file. Perl takes less than a second. What am I 
doing wrong?!?

Python
------
import sys
import string

stdin=sys.stdin
lower=string.lower

print map(lower,stdin.readlines())

Perl
----

print map(lc,<STDIN>);






More information about the Python-list mailing list