A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/011489.html below:

[Patches] [Patch #102915] xreadlines : readlines :: xrange : range

[Python-Dev] RE: [Patches] [Patch #102915] xreadlines : readlines :: xrange : range [Python-Dev] RE: [Patches] [Patch #102915] xreadlines : readlines :: xrange : rangeGuido van Rossum guido@python.org
Wed, 10 Jan 2001 10:12:56 -0500
> The strangest thing left to my eye is why xreadlines enjoys a significant
> advantage over the double-loop buffering method (readlines_sizehint) on my
> box; reducing the very large (1Mb) buffer in Guido's test program made no
> material difference to that.

I was baffled at this too (same difference on my box), until I
discovered that the buffer size is specified *twice*: once as a
default in the arg list of readlines_sizehint(), then *again* in the
call to timer() near the bottom of the file.

Take the latter one out and the times are comparable, in fact
readlines_sizehint() is a few percent quicker.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4