[Qt-interest] QString ot QUuid for QHash and QMap keys?

Jason H scorp1us at yahoo.com
Fri Oct 21 19:08:04 CEST 2011


I am wondering which if the following results in fastest lookups. I've got about 500-100o items in the collection, and I will constantly be doing lookups as the system gets the UUID for an object then proceeds to manipulate that object potentially several times a second, for each object.
QMap<QUuid, QObject*>
QHash<QUuid, QObject*>
QMap<QString, QObject*>
QHash<QString, QObject*>
 
Where the string keys are a QUuid::toString().mid(1,36) (trims the curley braces).
 
Also, why isn't there a toString() version that will just give me a string without the braces? I keep making Uuids, converting them to strings and cutting the braces off. 
 
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111021/1c6f8e3f/attachment.html 


More information about the Qt-interest-old mailing list