Is Unix stdio slow?
value
peter at ficc.uu.net
Wed Oct 5 07:04:59 AEST 1988
In article <26315 at ucbvax.BERKELEY.EDU>, edward at ucbarpa.Berkeley.EDU (Edward Wang) writes:
> Peter da Silva writes:
> >It always depresses me when I think that people are still doing line
> >buffered output. The problem of handling stdout and stdin is a solved
> >problem: do a flushbuf on all interactive streams whenever you do a
> >fillbuf on any interactive stream. . .
> The reason for implicit line buffering is to make certain programs
> more responsive when writing to a tty while still run at full speed
> when output is redirected.
A laudable goal. I'm not so sure that making the output line-buffered
is the way to do it. After all you may want to make them run at full
speed to a terminal device. And certainly interactive programs want
to be able to do this...
Really the best thing to do would be to have seperate flags for line
buffering and interactive buffering.
I'm more worried about block buffering on pipes on input, a long-standing
practice that greatly reduces the effectiveness of shared file descriptors.
Oh well... stdio certainly has its warts.
--
Peter da Silva `-_-' Ferranti International Controls Corporation.
"Have you hugged U your wolf today?" peter at ficc.uu.net
More information about the Comp.unix.wizards
mailing list