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