A RetroSearch Logo

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

Search Query:

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

readlines :: xrange : range

[Python-Dev] xreadlines : readlines :: xrange : rangeAndrew Kuchling akuchlin@mems-exchange.org
Thu, 4 Jan 2001 11:10:29 -0500
On Thu, Jan 04, 2001 at 04:59:25PM +0100, Thomas Wouters wrote:
>Note that I was just guessing there. I did a quick scan of the function, and
>noticed that the ALLOW_THREADS statements had moved into the outer loop. I
>didn't even contemplate whether that made a difference, so don't trust that
>judgement.

According to your benchmark, the performance of the threaded version
was the same whether or not getc_unlocked() was unused, so it's not
that flockfile() is really slow.  I can't believe the compiler
optimized the old, ungainly loop better than the newer, tighter loop.
That leaves the ALLOW_THREADS as the most reasonable culprit.

--amk




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