Showing posts with label object-oriented heap. Show all posts
Showing posts with label object-oriented heap. Show all posts

Saturday, January 30, 2016

Fast Object-Oriented Heap Implementation

There comes light to the darkness of your heaps.

This is the third post of a series of heap-related ones. See here and here for the back story.

In the last post, we found the heapq module lacking important features. Average Joe Dev doesn't want to clutter up his source code and and re-implement the same features all over the place to rectify the shortcomings of heapq. Understandably, Python core devs don't want to compromise on the performance of heapq either—being fast is the mission of a heap.