My question is : how to read files longer than 50 MB quickly (i.e. in about a second) by using a C++ or C program...
What I'm interested in is files, which contain plain integers...
I have already ruled out ifstream, cause it's far too slow for this purpose (8-9 secs).
Currently, I'm using fscanf, but still, it's very very slow (4 secs)....
I'm 100 % sure that the way files are read is the problem, and I'm not I/O bound.
Can you suggest any alternatives?
EDIT
File format:
1 2 41 2 1 5 1 2 ... (integers)