Path: utzoo!attcan!uunet!husc6!purdue!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: xseek(y,z,0) .vs. xseek(y,z,1) Keywords: How does it work? Is one faster? Message-ID: <11883@mimsy.UUCP> Date: 9 Jun 88 14:28:34 GMT References: <6463@shamash.UUCP> <1988Jun7.162241.14545@utzoo.uucp> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 13 In article <1988Jun7.162241.14545@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >In most implementations it isn't going to make any difference, because the >1 case is converted into the 0 case before anything else is done. Actually, in at least one implementation (4.[23]BSD), fseek(..., 0) is often slower than fseek(..., 1), because 0 (L_SET) calls lseek() once to find out where the offset is now, in case data in a pre-read buffer is already correct, then again if the data is not useful (belongs to the wrong region of the file). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris