An allocator for your perusal

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Juha Nieminen

    An allocator for your perusal

    I wrote this allocator which you can use with std::list, std::set and
    std::map (cannot be used with std::vector nor std::deque, but that
    doesn't matter because there would be no benefits with those).

    I have measured amazing speedups when using this allocator. For
    example I have made several speed tests using an std::list<intus ing
    the default allocator and my allocator, adding and removing large
    amounts of elements from the list repeatedly and I have measured huge
    speedups using my allocator. For example with the test I describe in the
    webpage below, 1min 12secs vs. 16secs. In a test program which I created
    specifically to thoroughly test the validness of the library I got
    9mins 33secs vs. 1min 2secs.

    Peak memory usage is harder to measure because there doesn't seem to
    be any reliable way of doing that in linux. However, from the little I
    have been able to measure, the peak memory usage dropped considerably
    when using my allocator (almost to half with std::list<int>) .

    Of course there are some disadvantages to the allocator, and it isn't
    suitable for all possible situations. Read more at:



    Tests and feedback would be appreciated.
Working...