[LLVMdev] Forward: Discussion about custom memory allocators for STL

Jon Harrop jon at ffconsultancy.com
Sat May 17 10:27:16 PDT 2008


On Saturday 17 May 2008 17:48:58 Roman Levenstein wrote:
> It would be interesting to hear what others think about
>  - custom allocators,

Unless you have very strong evidence that a specific change will provide 
considerable benefits without introducing problems anywhere else, I would 
strongly suggest forgetting about custom STL allocators and focussing on 
something more productive (i.e. features rather than optimizations). If you 
do go ahead with it, make sure it can be removed easily and keep checking 
that it remains worthwhile as the project develops.

One of the last things I did before I ditched C++ completely was to waste a 
lot of time Greenspunning garbage collectors in the form of custom STL 
allocators in a last desperate attempt to get adequate performance out of 
C++. My efforts were completely fruitless.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e



More information about the llvm-dev mailing list