I have to store 12000 numbers generated using the equation y = 1 - (2/(4*x+1)) where y is the resulting value and x is the index 0 - 11999, the result are used to increase or decrease another number which is irrelevant, instead of evaluating the equation I have decided to loop through all 12k possible values and keep them in an array and reuse the result.
Then pass a pointer to the array to multiple classes so it uses the same array.
Can this be done any better?
Would it be faster if I used flash memory?
Flash sounds great but it is not always the easiest to use and has limited write cycles. Have you considered FRAM, you can read and write as fast as you can manipulate the IO with no write delays involved. Those modules come with a lot of memory and they are non volatile so if you lose power you do not lose your data.
Your array will take up 1/2 of the total SRAM on the Due - which may limit the rest of your code.
If you need to use EEProm then try an experiment of reading a float from EEProm to see how long it takes compared with calculating it - you may find the calculation is faster.
Perhaps I've badly structured my posting as I did not mean to imply the Due has EEPROM, but I can see how anyone not familiar with a Due could read that in my comment, thanks for highlighting that.