TIP: Click on subject to list as thread! ANSI
echo: aust_avtech
to: Bob Lawrence
from: Roy McNeill
date: 1997-01-18 23:58:52
subject: getc()

BL>   I don't understand why fread() is faster than getc(). How do they

 BL> get the file data into the buffer? Don't you have to move it one

 BL> character at a time?



yes, but getc() does it with a call to a C function for *each*

character, instead of reading a bunch of chars with just one

function call.



I learned this the hard way with output - it's a lot faster to

write a whole string to the screen than it is to write the string

one char at a time.



Cheers



--- PPoint 1.88


* Origin: Silicon Heaven (3:711/934.16)
SEEN-BY: 711/808 934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.