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 1 year 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 19.93%

Comparing better-dfs (3464e58) with main (e32db8c)

Summary

⚡ 3 improvements ❌ 1 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 4.5 ms 2.1 ms ×2.1
fill-corner_to_corner_dijkstra 1.3 ms 1.7 ms -19.93%
corner_to_corner_dfs 31.5 ms 1.7 ms ×18
corner_to_corner_dijkstra 1.9 ms 1.6 ms +16.04%

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

Code change is moot

samueltardieu avatar Sep 05 '24 21:09 samueltardieu