Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!yale!husc6!think!nike!cit-vax!mangler From: mangler@cit-vax.Caltech.Edu (System Mangler) Newsgroups: net.unix-wizards Subject: Re: readv(), writev() Message-ID: <1035@cit-vax.Caltech.Edu> Date: Sat, 11-Oct-86 07:26:14 EDT Article-I.D.: cit-vax.1035 Posted: Sat Oct 11 07:26:14 1986 Date-Received: Sat, 11-Oct-86 21:33:20 EDT References: <4251@brl-smoke.ARPA> Organization: California Institute of Technology Lines: 17 Summary: readv(), writev() are slowing down read(), write() In article <4251@brl-smoke.ARPA>, mike@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@vlsi.caltech.edu {seismo,rutgers}!cit-vax!speck