c++ - Very fast object allocator for small object of same size -


I have to write some code, which should be the best performance.

Requirements:

For the quick construction of the object, I need a fast object oscillator. There are only 3 pairs in my object. Allocation and delocution will generate an object at the same time.

I did a lot of research and come up with:

  std: vector & lt; MyClass, Boost: fast_pool_allocator & lt; MyClass & gt; & Gt;  

I wonder (in 2014-07):

  • Is STL something to promote: Fast: fast_pur_allocator?

There is additional information to answer some comments:

  • Code used to customize my algorithm For me:
  • I need to improve the conversion of C # code in C or C ++. I should compete against other algorithms written in pure "C". I find that there are errors in my comparison chart in my article because I have tested against the code against the compiled code for X86-debug against the code. The "C" code is very fast in the X64-release (factor 4 to 5 times faster than x86-debug).
  • And accordingly, boost: fast_pool_allocator to use the best allocator for a small memory piece of the same size query but I want to make sure that there is nothing else that can be either more standard (Part of STL) or faster.
  • My code will be developed on Visual Studio 2013 and any Windows platform (no phone or tablet).
  • My intentions are not fast code, this is the fastest code. If possible, I should not have too much twisted code and should show the code which is at least one minimum.
  • If possible, I would like to know the effect of using std: vector versus array (i.e .:: []).
  • For more information, you can see

Search for, in fact, you create a dedicated pile for objects of one size (usually 2, 4 bytes, 16 bytes, etc.) and allocate objects to the pile, in which the small size blocks that fit in your object Can be included. There are fixed-size blocks in the heap, which is very easy to manage the blocks allocated in it, a bitmap can show you which blocks are in free or in-use, so the insertion is very fast (Especially if you allocate at the end and increase in the form of a point)

As an example, you can clearly specify it for your specific object size and requirements. Kulit can.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -