On Wed, Aug 2, 2017 at 7:58 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com> wrote:
> Vector reallocations show up in profiles all the time, literally in more > than half of the profiles I look at every day. If you examine for example > the large dependency graph of https://bugzilla.mozilla.org/s > how_bug.cgi?id=Speedometer_V2, a large number of optimizations that are > landing every day are merely removing various types of extra needless > buffer reallocations we have in profiles. Okay, that's a surprise to me, and definitely something I will try to keep in mind. But my question wasn't, "is pre-reservation ever valuable?" but rather "is it valuable in this particular code?" My assumption is that most code isn't performance-sensitive, and so simplicity should be the priority. The code Alexis cited at the top of the thread is here: http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/netwerk/base/Dashboard.cpp#435 Is Dashboard performance-sensitive? _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform