28 Feb
2010
28 Feb
'10
11:46 a.m.
Andrew Kokkalis
Joaquín M López writes:
I think I'm misunderstanding this: do you mean your container is holding 9500! elements? As 9500! ~ 9*10^33664 this can't possibly be the case.
Obviously it is not factorial! Once again i was wrong and fool The elements in my container are 46,238,536 (n^2 - n ) / 2 so complexity for storage is O(n^2)And the problem is that inserting those few elements into the multi_index container takes almost 9 minutes. As I said before I'm using "std::pair
insert(const value_type& x);".Is there a faster way to insert?
I take it you're inserting the elements in some sort
of double loop like this, right?
for(int i=0;i