Skip to content

Commit 9a7f075

Browse files
committed
Don't clone Features during Dijkstras graph walk
We currently copy the features objects in each channel as we walk the graph during route calculation. This implies a significant amount of malloc traffic as the features flags object are stored on the heap. Instead, because they features being referenced are in the network graph which we hold a reference to, we can simply store references to them. This nontrivially improves our get_route benchmark by around 5%.
1 parent 79ec716 commit 9a7f075

File tree

1 file changed

+95
-85
lines changed

1 file changed

+95
-85
lines changed

0 commit comments

Comments
 (0)