heapq
Python module is implementing heap-based priority queues: https://github.com/python/cpython/blob/3.11/Lib/heapq.py
Supporting these basic ops is useful for compiling Dijkstra-like loops which treat graph edges or nodes one by one based on some priority recalculation.
Ideally, these Python loops (using heapq.pop
and heapq.push
) could be compiled to C++ at least…