JuliaCollections / JuliaCollections/DataStructures.jl
`node_map` in MutableBinaryHeap grows indefinitely
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
If you push/pop an element in a loop 1 million times, nodes will be empty, but node_map will have length 1 million. It is never emptied. I think there could be better design using a circular buffer that would only ever require node_map to be as long as the maximum size of the heap?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MutableBinaryHeap implementation and trace how repeated push/pop operations update nodes and node_map. Reproduce the one-million-iteration case described in the issue; done means node_map no longer grows without bound when the heap is emptied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100