c++ - Best way to parse a large floating point file stored in ASCII? -


What is the best way to parse a large floating point file stored in ASCII?

What is the fastest way to do this? I remember telling someone that the Eastern is bad because it works on a small number of bytes, and it would be better to read the file first in memory. is it true?

EDIT: I am running on Windows, and the file format is for a point cloud that is stored in rows such as xyzrgb. I am trying to read them in arrays, besides files Approximately 20 & nbsp; MB, but I have 10 & nbsp; GB values ​​are. Second edit: Every time I make a visualization, it would be nice to make it as fast as possible, but honestly, if ifstream preforms is reasonably well, I should read it from the code It will not be pasting it is running very slow, but the software which I can do in anything, can have more hardware I / O limits, I just wanted to confirm.

I think your first concern should be to figure out how big the floating point numbers are. Or can there be duplicate data there? The conventional (C) way with FLASH specifier is to use FSNF for float and fich, rather it is faster. Iostreams add a little overhead in the case of parsing the data, but it is not only negligible. For the sake of summarizing, I recommend that you use iostreams (not to mention the features of the normal stream that you meet with it).

In addition, I think that this will actually help the community if you are trying to parse the number associated with your question, for example, for example, how many files are you doing? Is this a small memory footprint environment (like an embedded system)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -