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

[Python-Dev] xreadline speed vs readlines_sizehint

[Python-Dev] xreadline speed vs readlines_sizehintTim Peters tim.one@home.com
Mon, 15 Jan 2001 01:35:05 -0500
[Timmy]
> At this point I'm +0.5 on the idea of fileobject.c using
> ms_getline_hack whenever HAVE_GETC_UNLOCKED isn't available.

[NeilS, from Wednesday]
> Compare ms_getline_hack to what Perl does in order speed up IO.

Believe me, I have <wink>.

> I think its worth maintaining that piece of relatively portable
> code given the benefit.  If the code has to be maintained then it
> might was well be used.  If we find a platform the breaks we can
> always disable it before the final release.

Given that hearty encouragement, and the utterly non-scary results so far, I
just checked in a new scheme:

On a platform with getc_unlocked():
    By default, use getc_unlocked().
    If you want to use fgets() instead, #define USE_FGETS_IN_GETLINE.
        [so motivated people can use fgets() instead if it's faster
         on their platform]
On a platform without getc_unlocked():
    By default, use fgets().
    If you don't want to use fgets(), #define DONT_USE_FGETS_IN_GETLINE.
        [so if we stumble into a platform it fails on between
         releases, the user will have an easy time turning it off
         themself]




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