I am totally lost in terms of efficiently binning data in real time. What i am trying to do is assign a given value in to a dictionary(or some other structure if there is one thats more efficient).
For example, if I know that the date ranges between 0 - 100 (or some other customized bounds) and I have ten bins so bin 1 includes 0 to 10, etc, what would be the best implementation so that I can simply drop the value in to the data structure and it will automatically know here to put it?
I've looked at here but this is when you have all the data together, not when its coming in in real time.
My current design is simple to loop and identify which basket it belongs to but that is so slow when I have lots of incoming data points for iteration that have 100k loops.