My Custom Memory Pool Seems Too Slow. Need Advice.

Started by
10 comments, last by rip-off 9 years, 12 months ago

It would make more sense if you just used the same class for comparing the performance of the allocation method (make a version of the entity class without the Object base class). You only want to compare the allocation method, not the particular properties of the two different classes.

Additionally, I would argue that your test is not very fair to the pool allocator, because you only test allocation, not simultaneous allocation and deallocation, which might be a more realistic situation.

o3o

Advertisement
It isn't clear what problem you're trying to solve. Is allocation currently a bottleneck? Have you investigated trying to avoid heap allocation, rather than trying to speed it up?

This topic is closed to new replies.

Advertisement