Skip to content

Commit fe1a69d

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 ee64281 commit fe1a69d

File tree

1 file changed

+95
-85
lines changed

1 file changed

+95
-85
lines changed

0 commit comments

Comments
 (0)