Hi, I think what you want is a custom allocator : http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html http://www.boost.org/doc/libs/1_45_0/doc/html/interprocess/allocators_containers.html http://stackoverflow.com/questions/2439536/strategy-to-allocate-free-lots-of-small-objects hope that helps, mike
On Mon, Sep 24, 2012 at 1:02 PM, _ <neura...@gmail.com> wrote: > Hi guys > > I wana discuss proposed optimization step(optional switch?) to c++ > compiller that would make old and new code in some cases order of > magnitude faster by just pure recompilation. > > ...After all those attempts to store anything via = without waste I > think that compiller should do "placement new" transparently for us > whenever he encounters = on movable object. Instead of forcing us to > implement zillion && operators that solve only heap side of problem. > Deciding what kind of "this" object should use is easy since static > analysis deciding what object is movable is already part of new > compiller support for &&. > > Skyscrapper city[1000]; // instead of temp > city[1] = Skyscrapper("Empire State Building"); // compiller should > use &city[1] as this pointer > > This would fix heap and static(which && can't) waste = zero alloc/copy. > Why is static mem waste equally if not more important? Majority of > objects are small thus majority of their memory is static. > > Benchmark results in article www codeproject > com/Articles/453022/The-new-Cplusplus-11-rvalue-reference-and-why-you > > I am actively attemting to test this change in gcc > But I am kinda lost in gcc code. maybe somebody from you guys can > trow togethed this auto placement new instead of temp a lot faster > since you know your > code. > I just can't wait to see the numbers of speed gained from untouched c++ code. > Like running benchmark code from my article but with such compiller > changes. > > I love what you guys do. Keep up the great opensource work. > > Best Regards Ladislav [Unemployed] > neuralll[@]gmail[.]com -- James Michael DuPont Member of Free Libre Open Source Software Kosova http://flossk.org Saving wikipedia(tm) articles from deletion http://SpeedyDeletion.wikia.com Contributor FOSM, the CC-BY-SA map of the world http://fosm.org Mozilla Rep https://reps.mozilla.org/u/h4ck3rm1k3 Free Software Foundation Europe Fellow http://fsfe.org/support/?h4ck3rm1k3