Closed aschult5 closed 4 years ago
This will need to be fixed for concurrent functionality to be any decent
Finally getting around to this. Thinking about it more, GetStats can't be O(1) because we will have to make a copy of the data...which is of course O(n). I'll look into reducing the number of copies made (#37), but this isn't as high priority as it was.
Currently, each time GetStats is called the map is iterated over one by one into the list that gets returned. Instead, the data should be stored in a list and the map should hold pointers to each element to maintain O(1) updates of averages. Also, assume that the order of returned actions doesn't matter.