Fastest way to read numerical values from text file in C++ (double in this case)
<p>Currently, my code is simply this:</p>

<pre><code>void ReadFile(double Cst[][1000], char* FileName, int height)

FILE* ifp;
double value;
int nRead = 0;
int mRead = 0;

//open the file, check if successful
ifp = fopen( FileName, "r" );
if (ifp==NULL){
    ...
}


for (nRead = 0; nRead &lt; height; nRead++){
    for (mRead = 0; mRead &lt; 1000; mRead++){
        fscanf(ifp, "%le",&amp;value);
        Cst[nRead][mRead]=value;
    }
}

fclose(ifp);
</code></pre>

<p>What can I change to make it the fastest possible?</p>
