Faster way to write in a file
- From: LilacSkin <lpaulo07@xxxxxxx>
- Date: Wed, 13 Feb 2008 04:29:04 -0800 (PST)
Hi,
Currently, I write an signed long long in a file with the fprintf
function:
signed long long * pData = NULL;
unsigned long long k = 0;
unsigned long DataAvail = 0 ;
pDataRx = (signed long long *) malloc ( sizeof(signed long long ) *
(65536*16*8) / 8);
for ( k = 0; k < DataAvail/8; k ++ ) {
fprintf ( pFilec, "%lli\t", pData[k]);
}
The problem is that function is very very slow !
In several forums, I saw that fwrite function is better, but I don't
know how to use it.
Can you help me, please ?
Tk.
.
- Follow-Ups:
- Re: Faster way to write in a file
- From: Malcolm McLean
- Re: Faster way to write in a file
- From: Mark Bluemel
- Re: Faster way to write in a file
- From: santosh
- Re: Faster way to write in a file
- Prev by Date: Re: question on union
- Next by Date: Re: Faster way to write in a file
- Previous by thread: c
- Next by thread: Re: Faster way to write in a file
- Index(es):
Relevant Pages
|