3 ms·
Ever since Python 2.4, the heapq module has been written in C. It was only Python 2.3 which had the pure Python implementation. I've used heapq for several of
by dalke 14y ago
Ever since Python 2.4, the heapq module has been written in C. It was only Python 2.3 which had the pure Python implementation.
I've used heapq for several of my projects, including one where I did extensive performance testing, and I haven't found it to be a problem.
- z-factor 14y agoI want to add that I've been using heapq for scheduling in every piece of software as well and it's never been a problem even in heavily loaded projects.