On Tue, Aug 12, 2014 at 6:16 PM, Benoit Jacob <jacob.benoi...@gmail.com> wrote: > As far as I know, the only downside in replacing already_AddRefed by > nsCOMPtr would be to incur more useless calls to AddRef and Release. In the > case of "threadsafe" i.e. atomic refcounting, these use atomic instructions, > which might be expensive enough on certain ARM CPUs that this might matter. > So if you're interested, you could take a low-end ARM CPU that we care about > and see if replacing already_AddRefed by nsCOMPtr causes any measurable > performance regression.
Bug 1015114 removes those extra addrefs using C++11 move semantics, so assuming that lands, it's not an issue. (IIRC, Boris has previously said that excessive addref/release is a real performance problem and needs to be avoided.) _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform