[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)
Julien Blanc
julien.blanc at nmc-company.com
Tue Feb 10 17:08:55 CET 2015
On 10/02/2015 16:33, Knoll Lars wrote:
> IMO there’s simply too many questions that this one example doesn’t answer
> to conclude that what we are doing is bad.
Two arguments :
- implicit sharing is convenient, and really developer friendly. It is
probably a good idea since strings are really present a lot in signals
and slots (and afaik, passed by value in these context)
- implicit sharing is implicit, you don’t have the choice not to pay for
it, which is a bad thing.
From my experience, QStrings are slow. About two times slower than
using plain std::string in our use cases, but the culprit for this
slowness is, as far as we know, the internal 16 bits encoding, whereas
our data sources are all using utf-8. We have no evidence that the
implicit sharing cost is significant or not.
Now the question is, is there some simple way to disable QString (and
eventually other data structures) implicit sharing to make some real
world benchmarks ?
Regards,
Julien Blanc
More information about the Development
mailing list