On Mon, October 23, 2006 15:52, Peter Dimov wrote:
Ovanes Markarian wrote:
Well, I have messages consisting from multiple optional smaller object instances. I would like to try the approach described in A. Alexandrescu's Modern C++ Design: Small Object Allocator. Unfortunately I can not use it directly from Loki lib, since it does not have interface described in c++ standard for std::allocator.
I think 2% in such a small piece of software, which constists let's say from ca. 7 such small pieces can turn out into a 14% perfromance increase if a good allocation strategy can be found.
I wouldn't bet on that. The default allocator in g++ is reasonably good; it already has small block support built-in. Beating it by 14% will be quite a challenge in a real application (you could probably do it in a microbenchmark, though.) In addition, when multiple threads and CPU cores enter the picture, most simplistic small object allocators that use a single mutex perform rather badly. This includes quick_allocator. :-)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I know that in my case system gets (without used of shared_ptrs) really slow after some certain amount of time, which is not big (let's say it is measurable in minutes). The problem is really heap fragmentation. I really respect your huge know-how and also rely on it to 90%, but as you know in the software development nothing works as expected at first and I would like to make some real tests and measurements. I hope you are right, since I know which pain it is to implement such a beast as a solid peace of code. I went through the shared_ptr (not shared_counter) source of the version 1.33.1 but did not find where it is possible to pass the quick allocator instance. Is this additional constructor going to appear in the version 1.34? With Kind Regards, Ovanes Markarian