bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getline vs linebuffer


From: Eric Blake
Subject: Re: getline vs linebuffer
Date: Mon, 26 Sep 2011 16:24:29 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.14

On 09/26/2011 04:04 PM, Eric Blake wrote:
On 09/26/2011 03:47 PM, Reuben Thomas wrote:
Is linebuffer obsoleteable in the face of standardized getline and
friends?

Not necessarily, because linebuffer provides a slightly different
interface that might be easier to use. However, I do argue that both
linebuffer and getdelim can be written MUCH more efficiently, by doing
it in terms of freadahead and friends, rather than by one getc() at a time.

More to the point, I did the same conversion to getndelim2 back in 2008, and it made a very nice difference to cut:

https://lists.gnu.org/archive/html/bug-coreutils/2008-04/msg00372.html

So _both_ linebuffer and getdelim would benefit from a conversion to freadptr.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]