readv(), writev()

System Mangler mangler at cit-vax.Caltech.Edu
Sat Oct 11 21:26:14 AEST 1986


In article <4251 at brl-smoke.ARPA>, mike at BRL.ARPA (Mike Muuss) writes:
> Exactly right.  readv() and writev() allow one to, say, transmit
> a packet (header+data) from two separate buffers as one unit,
> without needing either (a) extra system calls, or (b) a bcopy().

bcopy() is about 4 times as fast as pipes for copying data.

On raw devices, physio() generates a physical I/O for each element
of a readv() or writev().

The far more common read() and write() are implemented in terms of
the more complicated readv() and writev(), slowing down the former
two system calls.  I doubt that the gains of readv() and writev()
are used frequently enough to win back the speed loss to read()
and write().  Really now, how often do you call perror()?

Don Speck   speck at vlsi.caltech.edu  {seismo,rutgers}!cit-vax!speck



More information about the Comp.unix.wizards mailing list