[cfe-dev] Proposed C++ optimization with big speed gains with big objects
Ladislav Nevery
neuralll at gmail.com
Thu Sep 27 09:24:06 PDT 2012
ups here is beter example that actually reflects your case with working
optimization enabled.
TextFile textfile[1000]
textfile[1]=TextFile("a.txt"); // = we call destructor doing nothing
and placement new for first assign = we skip alloc/copy
textfile[2]=TextFile("b.txt"); // = we call destructor doing nothing
and placement new for first assign = we skip alloc/copy again
textfile[1] = textfile[2]; //copy the content of b.txt in a.txt.
optimization disabled due to not first assign anymore
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Proposed-C-optimization-with-big-speed-gains-with-big-objects-tp4026886p4026992.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list