This document outlines the planned evolution of the d-Heap Priority Queue project.
Each milestone follows a deliberate sequence:
- Validate before expanding — Prove existing implementations work in real algorithms before adding new languages
- Fill ecosystem gaps — Prioritize languages where quality d-ary heap libraries don't exist
- Teach by example — Demonstrate why d-ary heaps matter through canonical use cases
v2.2.0 — Core implementations complete for C++, Rust, Zig, and TypeScript.
Why start here?
Dijkstra's shortest path algorithm is the canonical reason d-ary heaps exist. It performs many more decrease_priority operations than pop operations on dense graphs. A 4-ary heap reduces decrease_priority from O(log₂n) to O(log₄n)—a measurable win.
Starting with TypeScript enables:
- Fast iteration — No compilation step; instant feedback
- NPM momentum — The TypeScript library is already published; users need a usage example
- Visualization groundwork — A future React-based visualization can import this example directly
-
examples/directory structure -
examples/dijkstra/README.md— Algorithm explanation and complexity analysis -
examples/dijkstra/graphs/small.json— Shared test graph (used by all languages) -
examples/dijkstra/TypeScript/— Working implementation -
benchmarks/directory scaffold (populated in v2.4.0)
Why Go? Why now?
Research revealed the only existing Go d-ary heap library lacks decrease_priority and O(1) item lookup—the very features that make d-ary heaps useful for graph algorithms.
Adding Go after the TypeScript example (rather than before) means:
- The example pattern exists — Dijkstra structure is already defined
- Architecture is validated —
go.worksetup tested with a real use case - Different audience reached — Go developers ≠ TypeScript developers
-
Go/— Full implementation with API parity -
go.work— Workspace configuration for local development -
examples/dijkstra/Go/— Dijkstra implementation - Published on pkg.go.dev
Why wait for the other languages?
By this point, both the example structure and a new language integration have been battle-tested. Completing the remaining examples becomes straightforward.
Same algorithm, same graph, five languages—ideal for:
- Learning — Compare idiomatic patterns across languages
- Benchmarking — Measure d=2 vs d=4 vs d=8 performance
- Credibility — Proves the unified API works everywhere
-
examples/dijkstra/Cpp/ -
examples/dijkstra/Rust/ -
examples/dijkstra/Zig/ -
benchmarks/scripts/— Benchmark runners for each language -
benchmarks/results/— Comparative data (d=2 vs d=4 vs d=8) - Updated README with complete examples matrix
The following are under consideration but not yet scheduled:
| Item | Description |
|---|---|
| Julia implementation | No d-ary heap exists in the Julia ecosystem—significant gap |
| React Flow visualization | Interactive step-through of Dijkstra with animated heap operations |
| Additional examples | Prim's MST, A* search, event-driven simulation |
| Performance benchmarks | Formal benchmarks with reproducible methodology |
Interested in helping? Open an issue to discuss.
Feedback on this roadmap is welcome—open an issue titled [Roadmap] with your thoughts.