KVC@ENGVAX.SCG.HAC.COM (Kevin Carosso) (06/25/87)
I'm not much of a C programmer, so be kind... (but I'm an INFO-VAX old-timer!) I've got a user with a C program that basically does read () and write () to move data from one file to another. He says that it is terribly slow, like one minute for a 1000 block data file. Now, do most people find read and write in C to be slow compared with (say) RMS calls? or with read and write on a suitably similar UNIX machine? is there a big performance difference between stream files and carriage return text files? He says DEC told him that it's slow because write () won't write more than 512 bytes at a time. Even if that's the case, should it be so slow? My guess is that it only reads one records-worth and hence his code only writes one records-worth. Maybe it's that slow record-at-a-time. If I'm right, would the same apply to stream files? (he says the input file was created with a C program, so it could be a stream file). Finally, should I just tell the guy that he has to use RMS or block-mode QIO's for speed (that's what I'd do, but I'm not a C programmer). He really doesn't want to use any "horrible VMS system calls". Anyway, I know the question is not posed very well, but if I get enough input I can figure out what's going on and the best remedy. Thanks, /Kevin Carosso kvc@engvax.scg.hac.com Hughes Aircraft Co. kvc%engvax@oberon.usc.edu