pathfinding
pathfinding copied to clipboard
feat(dfs): make DFS more efficient by using IndexMap rather than Vec
This causes an API change as using an IndexMap
requires the type to implement Hash
.
CodSpeed Performance Report
Merging #553 will degrade performances by 11.93%
Comparing better-dfs
(884e7d5) with main
(1ef8a9a)
Summary
⚡ 2
improvements
❌ 2
regressions
✅ 30
untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmarks breakdown
Benchmark | main |
better-dfs |
Change | |
---|---|---|---|---|
⚡ | fill-corner_to_corner_dfs |
15.1 ms | 7.7 ms | +94.57% |
❌ | fill-corner_to_corner_dijkstra |
7.2 ms | 8.1 ms | -11.93% |
⚡ | corner_to_corner_dfs |
187.1 ms | 8.1 ms | ×23 |
❌ | no_path_dijkstra |
7.1 ms | 8.1 ms | -11.76% |