Hello,

I Parse Many Data Files For Web Page CGI-BIN's...

My Scripts Are Not Runnning "Slow",  I just  want to make sure that
under load,
they aren't doing anything unnessesarily stupid with File Reads...

Which of the following is faster,  (by alot or a little?!)
(on a carriage-return separated data file)

((( Method #1 )))
char line[200]; char ch=0; int x=-1;
while (ch!='\n') { fread(F,1,1,&ch); ++x; line[x]=ch;}
line[x]=0;
((( Method #2 )))
char line[200]; char ch=0; int x=-1;
while (ch!='\n') { ch=fgetc(F); ++x; line[x]=ch;}  //Is Getc Any Faster
Than FRead???
line[x]=0;
((( Method #3 )))
Some Sort Of A READ-LINE command,  Is there one,  would it be faster?


Thanks!
-joe

Reply via email to