In addition, Jon answer I would like to add that your inner loop is not very suitable, as a rule, you do a minimum of work in the inner loop and then the relative loss of dictionary performance is somewhat lower.
If you look at the Double.GetHashCode() code in Reflector, you will find that it executes 4 lines of code (assuming your double is not 0), this is more than the body of your inner loop. Dictionary<TKey, TValue>.Insert() (called the dialing index) is even more code, almost full screen.
The thing with the dictionary compared to a flat array is that you do not waste a lot of memory when your keys are not dense (as in your case), and that reading and writing ~ O (1) is like arrays (but with a higher constant )
As a note, you can use a multidimensional array instead of the 6*k+j trick.
Declare it this way
var arrayList = new double[times.Count, 6];
and use it that way
arrayList[k ,j] = simpelCompute;
It will not be faster, but easier to read.
source share