<div dir="auto">Thank you for the insight. I wasn't aware that a QMap would perform better for smaller entries. Since my map would contain only small number of entries on average (as number of faces in an image will not be very large), I think I should stick with the QMap implementation.<div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto">Kartik</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 9 Jul 2020, 22:54 Maik Qualmann, <<a href="mailto:metzpinguin@gmail.com">metzpinguin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A QHashMap brings a speed advantage for a large number of entries, because <br>
access is constant time. A QMap can be faster with a few, say up to 200 <br>
entries. With Qt4 there were sometimes problems if the key was a string in a <br>
QHashMap, which was not unique when converted to a hash. That should no longer <br>
occur with Qt5. So, many thousands of entries with a lot of access -> <br>
QHashMap. Keep in mind that the keys of a QMap are sorted automatically.<br>
<br>
Maik<br>
<br>
Am Donnerstag, 9. Juli 2020, 15:24:31 CEST schrieb Kartik Ramesh:<br>
> Hi all,<br>
> <br>
> I was working on categorizing Face Suggestions by Suggested Name. This<br>
> would lead to a grouping of similar faces, which would be particularly<br>
> helpful in the Unconfirmed Tag View.<br>
> <br>
> To do the categorization, I have been able to implement methods to obtain a<br>
> Map of Face Regions -> Suggested Names for each Image. This would have<br>
> multiple elements if an image has multiple faces. I have committed the<br>
> implementation already.<br>
> <br>
> Since, I don't have any reason for my keys to be sorted, I was wondering if<br>
> I should use a HashMap instead of a QMap?  I have currently used a QMap<br>
> because all methods related to Faces use it.<br>
> <br>
> Thanks in advance<br>
> Kartik<br>
<br>
<br>
<br>
<br>
</blockquote></div>