I just have to write some code that has to have best performance.
Requirements:
I need a very fast object allocator for quick creation of object. My object as only 3 doubles in it. Allocation and deallocation will occurs one object at a time only.
I made a lots of research and come up with:
std::vector<MyClass, boost::fast_pool_allocator<MyClass>>
I wonder (in 2014-07):
There is additional information to answer some comments:
The closest thing to what I was looking for was Paulo Zemek Code Project article: O(1) Object Pool in C++.
But I finally did allocate/reserve memory of size= the maximum size possible * my object size. Because I was not using any objects that required to live longer than my algorithm loop, I cheated by saying that location in reserved memory space was object. After my algorithm loop, I flushed the reserved memory space. It appears to me to be the fastest. Very not elegant but extremely fast and only require one allocation and one deallocation.
I was not totally satisfy with the answer, that's why I answered myself. I also added a comments to the questions about every comments and added this answer to make thinks clear. I know that my decision/implementation was not totally in accordance with the question but I think that it should have conducted to something similar.