Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/3/84; site talcott.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!tmb
From: tmb@talcott.UUCP (Thomas M. Breuel)
Newsgroups: net.unix,net.lang.c
Subject: Re: READ versus FREAD and WRITE versus FWRITE ...
Message-ID: <343@talcott.UUCP>
Date: Sat, 9-Mar-85 01:12:18 EST
Article-I.D.: talcott.343
Posted: Sat Mar  9 01:12:18 1985
Date-Received: Mon, 11-Mar-85 06:41:50 EST
References: <1070@tekgvs.UUCP>
Organization: Harvard University
Lines: 13
Xref: watmath net.unix:3899 net.lang.c:4702

> 	I would be interested to know in which cases 
> 		read/write(fildes, buffer, nbytes)'s
> 	are more time efficient than 
> 		fread/fwrite(ptr, sizeof(*ptr), nitems, stream)'s .

If you read large (> blocksize) items from a file, then read/write
is faster. This is because fread/fwrite use read/write to read
blocks from a file.

Personally, I prefer using stdio for terminal I/O and read/write for
binary file I/O.

						Thomas.