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/011334.html below:

readlines :: xrange : range

[Python-Dev] xreadlines : readlines :: xrange : rangeThomas Wouters thomas@xs4all.net
Thu, 4 Jan 2001 16:59:25 +0100
On Thu, Jan 04, 2001 at 10:43:15AM -0500, Andrew Kuchling wrote:
> On Thu, Jan 04, 2001 at 03:59:05PM +0100, Thomas Wouters wrote:

> >getc_unlocked(). getc() is faster than flockfile(f) + getc_unlocked(f) (+
> >the rearranging of the function, use of PyTHREAD_ALLOW inside the outer loop,
> >etc.) Significantly so when there is only one thread running (which is still

> So it looks like the ALLOW_THREADS should be moved out of the for
> loop.  This produced no measureable performance difference on Solaris;
> I'll leave it to GvR to try it on Linux.  I wonder if FreeBSD has some
> unusually slow thread operation?

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.

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



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