On terça-feira, 5 de novembro de 2013 13:45:07, Olivier BARTHELEMY wrote: > Hi, > > Given code that would look like : > > QMap<SomeType> theMap; > .... > { > theMap[someIndex] = someValue; > } > > Is it safe to assume that replacing the operator with the insert method > will improve the performance for new elements (copy constructor used > directly instead of default constructor + assignment operator ), while not > being slower for the modification of an element that already exists?
Konstantin is right -- if you care about performance at this level, check with a profiler. However, given what I know from QMap's source code, you'll probably find out that you are right. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest