3 ms·
On a related note, the source code for Python demonstrates a practical way to cache-optimize the heapify() operation for the garden-variety heap implementation
by raymondh 11y ago
On a related note, the source code for Python demonstrates a practical way to cache-optimize the heapify() operation for the garden-variety heap implementation of a priority queue:
https://hg.python.org/cpython/file/6fd69aeb8a3b/Modules/_heapqmodule.c#l272 https://hg.python.org/cpython/file/6fd69aeb8a3b/Modules/_hea...