I've posted a question yesterday and I solved this by using multi_map: Having a composite key for hash map in c++
This works like a charm but the problem happens when the datasrt is big enough.
My data set is around 10M big, and it takes +350secs with ordered index, and 80secs with hashed index(unordered) for insertion.
This is a quite long time in comparison to map(pair, double) data structure which took only 25secs.
Does anyone have any idea improving the calc speed? Memory consumption is okay but the speed really matters to me.