Prediction: explain insertions complexity

This commit is contained in:
mischa 2024-03-18 15:49:02 +08:00
parent dfa551239e
commit af35e8678f

View File

@ -115,6 +115,7 @@ public static T CorrectHistory<T>(
history.RemoveAt(0);
// insert the corrected state into the history, or overwrite if already exists
// SortedList insertions are O(N)!
history[corrected.timestamp] = corrected;
// the entry behind the inserted one still has the delta from (before, after).