On 13 fév, 19:51, LilacSkin <lpaul...@iseb.fr> wrote:
> On 13 fév, 15:13, Morris Dovey <mrdo...@iedu.com> wrote:
>
>
>
> > Mark Bluemel wrote:
> > > How does dumping the data in binary form compare to writing a
> > > tab-delimited textual representation?
>
> > If the textual representation is being done by fprintf(), writing
> > the unconverted data in binary form is _much_ faster - and, of
> > course, may produce problems if there's a subsequent need to read
> > the data on a different machine.
>
> > A special-purpose double -> text conversion routine can provide a
> > fair amount of speed improvement. A real-world example was
> > developed in this CLC thread:
>
> >http://groups.google.com/group/comp....d/thread/eb329...
>
> > (mind the wrap)
>
> > --
> > Morris Dovey
> > DeSoto Solar
> > DeSoto, Iowa USAhttp://www.iedu.com/DeSoto
>
> Your idea is to use your "convert" function and to fwrite the
> converted buffer ?
> If yes, can I cast an long long in double to directly use it ?
>
> Thanks !
In fact the most important thing is to write faster.
I have 1,6 Mbyte/s of raw data to write during a couple of days.
Because of the amount of data, I can't reformat their after.
The data are stored in a char buffer and I need to put in a file as a
signed long long.
The size of the buzzer is 8 Mbyte, refreshed every 5 sec.
I think the best way is to format them and use a fwrite or _write
function .