I have two sorted dictionaries. The first one is just filled with NANs, the second one has some values.
I want to change NANs of the first one to values of the second one.
SortedDictionary<double, float> newlogdict = newlog.Samples;
SortedDictionary<double, float> oldlogdict = oldlog.Samples;
foreach (KeyValuePair<double, float> kvp in newlogdict)
{
oldlogdict[kvp.Key] = kvp.Value;
}
It works, but it is too slow, is there any faster way?