Tyler Stromberg

Results 34 comments of Tyler Stromberg

> Just one quick initial comment/question while browsing, push/pop is documented as `Complexity: O(log n)` - although if skipping levels [as mentioned in article referenced previously in #3](https://probablydance.com/2020/08/31/on-modern-hardware-the-min-max-heap-beats-a-binary-heap/) the time...

In the case of `Sequence` conformance, how do we handle the double-endedness of the `PriorityQueue`? i.e. Should `next()` iterate from lowest to highest priority or vice-versa?

> > In the case of `Sequence` conformance, how do we handle the double-endedness of the `PriorityQueue`? i.e. Should `next()` iterate from lowest to highest priority or vice-versa? > >...

I think conforming to `Collection` is out — I don't think there's a way to do this efficiently. > > Direct access to the underlying heap array could be useful...

@AmanuelEphrem Do you want to work on implementing `ascending` and `descending` and open a PR against my branch? I was thinking of returning an `Iterator` from both of those that...

Here's a first pass at performance tests:

> Interesting! Out of curiosity what hardware is this running on? (And to confirm it is built in release mode?) This was run on a 2019 MacBook Pro (2.3 GHz...

> @AquaGeek Nice! It'd be great to see how the performance compares to [CFBinaryHeap](https://developer.apple.com/documentation/corefoundation/cfbinaryheap-s11) for equivalent operations (e.g. `CFBinaryHeapAddValue` and `CFBinaryHeapGetMinimum`)! @kylemacomber Here's a quick pass at adding `CFBinaryHeap` implementations....

Thank you to everyone who provided feedback on this. I have integrated most of it. Remaining tasks: - [x] Merge @AmanuelEphrem's `Sequence` conformance (waiting on some tweaks from his side)...

> Just in case it was missed as it was part of a different comment above and now marked resolved, @timvermeulen suggestion on an iterative implementation of e.g. `mutating func...