mikeash.com pyblog/using-evil-for-good.html commentshttp://www.mikeash.com/?page=pyblog/using-evil-for-good.html#commentsmikeash.com Recent CommentsThu, 28 Mar 2024 16:31:39 GMTPyRSS2Gen-1.0.0http://blogs.law.harvard.edu/tech/rssmikeash - 2007-01-04 05:27:00http://www.mikeash.com/?page=pyblog/using-evil-for-good.html#commentsDiscovering why your app is slow is best done with Shark. A bit of time with that would have told you for sure that the sorting was taking up all of your time. But anyway, you managed to figure it out all on your own so it worked out, Shark just makes the job a lot easier. I&amp;#8217;m glad you found the code helpful <br />4802e443a7dfb1bf08e1df59317740b4Thu, 04 Jan 2007 05:27:00 GMTScott A - 2007-01-03 19:11:00http://www.mikeash.com/?page=pyblog/using-evil-for-good.html#commentsThis was great, I was using the sortUsingSelector on my hypothesis generation code for, I had stacks of hypothesis around 10000 each and it was taking forever but the (log n) totally kicks ass! I was wondering why my code was taking forever to run, I assumed that the sortUsingSelector might be a priority queue but I guess not quite haha&amp;#8230; Anyways, thanks for this tidbit, I also abhor C++, due to my lack of understanding it&amp;#8217;s memory management. Anyways, I was able to adapt the code a little bit since my objects already had their values stored within them and along with some retain/release messages when adding and popping. <br />1bcf040e5d2a773cbb4344b5a8415902Wed, 03 Jan 2007 19:11:00 GMTmikeash - 2006-07-15 15:34:00http://www.mikeash.com/?page=pyblog/using-evil-for-good.html#commentsGood ol&amp;#8217; CoreFoundation, I missed that one. I&amp;#8217;m still happy with my STL wrapper because it gives me warm performance fuzzies, and because with CF I would have to do some extra memory management due to wanting to store each node next to its cost in the queue. <br />fc23dbbaa1c904a899c8e9977e73decbSat, 15 Jul 2006 15:34:00 GMTAhruman - 2006-07-15 09:25:00http://www.mikeash.com/?page=pyblog/using-evil-for-good.html#commentsThere’s no NSPriorityQueue, no… but there is a CFBinaryHeap. &lt;img src="/blog/pivot/includes/emot/e_121.gif" alt=";-)" align="middle" /&gt; <br />f94dcdb95a898c90078f1207aaf8a4faSat, 15 Jul 2006 09:25:00 GMT