On Monday 15 June 2015 10:01:47 Tomaz Canabrava wrote:
> QMaps are not ordered, so the factor could be just 'luck'

Yes they are. QMaps are sorted based on the key type's operator<. Insertion 
and searching is therefore O(log n) (binary search).

If you don't need the order, the best way is to use a QHash, which has O(1) 
insertion and searching in the typical case (non-degenerate). However, note 
that not only is the order arbitrary, it will change from one start of the 
application to another.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to