I wonder if calculations of arrays is faster compared to if you do calculations from a simple .txt file.
I will give this example.
(Calculation from a .txt file while reading it)
The .txtfile has one line and look like this:
1,2,3,4,5
I will do a calculation right from the file while reading. I split the values and do:
1*2*3*4*5 wich will give me: 120
.................................................. ..........................
Instead of the above approach I will already have these values stored and ready in an array called Test[4]
The calculation will be:
Test[0] * Test[1] * Test[2] * Test[3] * Test[4] wich will give me: 120
Now I wonder if the calculations with the arrays is faster than while reading from a .txt file in realtime and doing the calculations.
If it is, how much faster are we talking about here ?
We could also refer to an example where we will use 1 million numbers instead of 5 as in our example wich will be closer to what I will do later.
Why I wonder this is because I will use very large .txtfiles and do calculations with.
Thanks...