[Python-Dev] xreadlines : readlines :: xrange : range

Neil Schemenauer nas@arctrix.com
Mon, 8 Jan 2001 08:22:10 -0800


On Mon, Jan 08, 2001 at 03:59:40PM -0500, Tim Peters wrote:
> My line-at-a-time test case used (rounding to nearest whole integers) 30
> seconds in Python and 6 in Perl.  The result of testing many changes to
> Python's implementation was that the excess 24 seconds broke down like so:
> 
>     17   spent inside internal MS threadsafe getc() lock/unlock
>              routines
>      5   uncertain, but evidence suggests much of it due to MS
>              malloc/realloc (Perl does its own memory mgmt)
>      2   for not copying directly out of the platform FILE*
>              implementation struct in a highly optimized loop (like
>              Perl does)

Have you tried pymalloc?  

  Neil