tag:blogger.com,1999:blog-6223976744110856384.post5007025530352650046..comments2024-02-26T00:27:08.710-08:00Comments on Qt ,Maemo and some other stuff: Simple priority queue with QtAnonymoushttp://www.blogger.com/profile/18433786928656006467noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6223976744110856384.post-58572240060878365972010-12-15T23:18:26.369-08:002010-12-15T23:18:26.369-08:00FYI: Complexity algorithms used in Qt containers
h...FYI: Complexity algorithms used in Qt containers<br />http://doc.qt.nokia.com/latest/containers.html#algorithmic-complexity<br /><br />You may be already know this: "...If there are multiple items for key in the map, the value of the most recently inserted one is returned..." (From Qt QMap::value reference.) So same priority tasks can be executed in backwards order.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6223976744110856384.post-71638606983436272122010-12-15T22:07:59.007-08:002010-12-15T22:07:59.007-08:00Thanks for suggestion, true, my mind skipped QMult...Thanks for suggestion, true, my mind skipped QMultiMap. I don't know about performance much, but I could have implemented priority queue with multimap also.Anonymoushttps://www.blogger.com/profile/18433786928656006467noreply@blogger.comtag:blogger.com,1999:blog-6223976744110856384.post-15060244258825447542010-12-15T00:33:37.169-08:002010-12-15T00:33:37.169-08:00Thanx for snippet.
1. Have you considered QPair i...Thanx for snippet.<br /><br />1. Have you considered QPair instead of your Item?<br />2. Have you considered QMultiMap instead of QQueue? Multimap sould provide better performance than QQueue, but items with same priority will be reversed if we do nothing with it.Anonymousnoreply@blogger.com