Skip to content

Commit b0f420b

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 e5f8d1b commit b0f420b

File tree

1 file changed

+79
-69
lines changed

1 file changed

+79
-69
lines changed

0 commit comments

Comments
 (0)