pathfinding icon indicating copy to clipboard operation
pathfinding copied to clipboard

feat(dfs): make DFS more efficient by using IndexMap rather than Vec

Open samueltardieu opened this issue 3 months ago • 1 comments

This causes an API change as using an IndexMap requires the type to implement Hash.

samueltardieu avatar Mar 24 '24 10:03 samueltardieu

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%

codspeed-hq[bot] avatar Mar 24 '24 10:03 codspeed-hq[bot]