core-lightning/gossipd
Rusty Russell f8ffae837d gossipd: speed Dijkstra a little.
Our uintmap can be a little slow with all the reallocation, so leave
NULL entries and walk to find the first one.  Since we don't clean
them up, keep a cache of where the min non-all-NULL value is in the
heap.

It's clearer benefit on really large tests, so here's 1M nodes:

Comparison using gossipd/test/run-bench-find_route 1000000 10:

Before:
	10 (10 succeeded) routes in 1000000 nodes in 91995 msec (9199532898 nanoseconds per route)

After:
	10 (10 succeeded) routes in 1000000 nodes in 20605 msec (2060539287 nanoseconds per route)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-18 06:33:09 +00:00
..
test gossipd: implement Dijkstra. 2019-04-18 06:33:09 +00:00
broadcast.c gossipd: fix the check for node announcement in broadcast_state_check() 2019-04-16 00:20:26 +00:00
broadcast.h gossipd: adjust peers' broadcast_offset when compacting store. 2019-04-11 18:31:34 -07:00
gossip_constants.h Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
gossip_peerd_wire.csv Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
gossip_store.c gossipd: adjust peers' broadcast_offset when compacting store. 2019-04-11 18:31:34 -07:00
gossip_store.csv daemons: use amount_msat/amount_sat in all internal wire transfers. 2019-02-21 08:01:37 +00:00
gossip_store.h gossipd: adjust peers' broadcast_offset when compacting store. 2019-04-11 18:31:34 -07:00
gossip_wire.csv Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
gossipd.c gossipd: adjust peers' broadcast_offset when compacting store. 2019-04-11 18:31:34 -07:00
Makefile Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
routing.c gossipd: speed Dijkstra a little. 2019-04-18 06:33:09 +00:00
routing.h gossipd: implement Dijkstra. 2019-04-18 06:33:09 +00:00