Michael Dunsmuir

Results 8 comments of Michael Dunsmuir

I happened across this gem while messing around with some pathfinding algorithms, and it fit the bill... but then I got curious about the implementation and was able to improve...

My interface isn't fully compatible yet, but there aren't really any big issues to getting there... I just have to add a bit more code and think about some optimizations,...

Here are the times for adding 100k random values at once (at initialization) and then popping them all at once: PriorityQueue time: 2.79624 seconds, PQueue time: 0.740536 seconds Here's the...

I did mess around with some other options, and eventually realized (duh) that you can just initialize it with a sorted array and that satisfies the heap property. There is...

Of course, at that point, it comes down to the user to understand where it becomes more efficient to concat than push individually... we could also cache pushes until the...

Here's some results with that optimization; first, initialized with 100k values then everything popped: PriorityQueue time: 0.095463 seconds, PQueue time: 0.72315 seconds And now, with 100k values, the same iteration...

Hey, just wanted to let you know that I haven't forgotten about this! Things just got very busy in my life all of a sudden; I should have some bandwidth...

I recently happened across this gem much in the same way you seem to have (by working on pathfinding algorithms) and I wrote an implementation of PQueue that is still...