Re: printf() overhead

From: Gene Heskett
Date: Sun Jan 09 2005 - 15:28:41 EST


On Sunday 09 January 2005 14:25, John Richard Moser wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>using strace to run a program takes aeons. Redirecting the output
> to a file can be a hundred times faster sometimes. This raises
> question.
>
>I understand that output to the screen is I/O. What exactly causes
> it to be slow, and is there a possible way to accelerate the
> process? - --

As to what causes the slow, well fonts have to be rendered, and the
screen has to be scrolled, both of which take finite pieces of time.
Displaying the file later just shifts the rendering etc time to
something thats not nearly so noticeable because you can't read that
fast anyway...

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.31% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/