Den 21-01-2016 kl. 14:15 skrev Milian Wolff:
On Donnerstag, 21. Januar 2016 05:44:05 CET Kevin Kofler wrote:
I consider reserve() to be a technical detail and a micro-optimization I
really should not have to bother with in 99+% of the cases.

That's how it should be.

This is very wrong. In my experience with profiling applications, the most
hotspots can be fixed by adding reserve to loops where the size is known or
can be guessed. This has a tremendous effect on runtime speed, also for
QVector using realloc

And this is how it is.

Bo Thorsen,
Director, Viking Software.

--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to