User talk:GordonBGood: Difference between revisions

Content added Content deleted
(comments on PriorityQ)
(Comment signing?)
Line 21: Line 21:


: Thanks for the link, Will. I had found the implementation of the PriorityQ, including the HybridQ in one of your ideone entries, but not the original source for "PriorityQ.hs"; BTW, I had seen the minor slip-up in the implementation of PriorityQ (forgetting to reverse the order of the left and right branches in one place), which would only affect deletions as the original algorithm does not use and therefore would not affect its primes generation. My improved entry does not use HybridQ as it seems to be an alternate method of compensating for the over-eagerness of adding primes, nor do I use the SPECIALIZE'ations to compensate for the various numeric ranges required, as the method as you use in your second "Unbounded" entry seems so much cleaner. My entry uses some fusion to avoid list processing, but there are likely other optimizations that could be used; my point is not really that this is the fastest way to implement a Priority Queue version but to show that it is relatively clean and easy to avoid over-eager primes adding and excessive list processing.
: Thanks for the link, Will. I had found the implementation of the PriorityQ, including the HybridQ in one of your ideone entries, but not the original source for "PriorityQ.hs"; BTW, I had seen the minor slip-up in the implementation of PriorityQ (forgetting to reverse the order of the left and right branches in one place), which would only affect deletions as the original algorithm does not use and therefore would not affect its primes generation. My improved entry does not use HybridQ as it seems to be an alternate method of compensating for the over-eagerness of adding primes, nor do I use the SPECIALIZE'ations to compensate for the various numeric ranges required, as the method as you use in your second "Unbounded" entry seems so much cleaner. My entry uses some fusion to avoid list processing, but there are likely other optimizations that could be used; my point is not really that this is the fastest way to implement a Priority Queue version but to show that it is relatively clean and easy to avoid over-eager primes adding and excessive list processing.


==Comment Signing on Talk pages==
Please sign your comment on Y Comb. Thanks. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:21, 31 July 2016 (UTC)