This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux vs. libio
In article <Pine.LNX.4.10.9912211422460.7718-100000@kevins-linux>,
Kevin Atkinson <kevinatk@home.com> wrote:
>On 21 Dec 1999, Per Bothner wrote:
>> Kevin Atkinson <kevinatk@home.com> writes:
>> > >From http://www.sgi.com/Technology/STL/standard_library.html:
>> > Which is what I was trying to get at. By directly maniplulating FILE
>> > one avoids the extra overhead.
>> Wise man say: "Every problem in computer science can be solved
>> by adding an extra level of indirection." While SGI's technique
>> is clever, it is basically just another layer of indirection.
>> Specifically, you get at least two extra memory de-references
>> even in the fast case.
>Will that extra level of indirection *really* make a diffrence in speed I
>mean IO is something which is fairly slow in the first place.
It does make a *real* difference.
I have some hard measurement data where I shaved 20% off a program's
execution time by getting data line by line and managing the buffer myself
instead of using fgetc.