]> git.bitcoin.ninja Git - rust-lightning/commit
Drop the `dist` `HashMap` in routing, replacing it with a `Vec`.
authorMatt Corallo <git@bluematt.me>
Mon, 24 Jun 2024 23:50:29 +0000 (23:50 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 10 Jul 2024 01:31:48 +0000 (01:31 +0000)
commit43d250dadcdad54836eacd8b447bb36d5c8e6cb5
tree8d9010bce088abf69b229ff4481a49f8e55eb80f
parentc34980c47fc4b9976a477e613e73b893bad179ee
Drop the `dist` `HashMap` in routing, replacing it with a `Vec`.

Now that we have unique, dense, 32-bit identifiers for all the
nodes in our network graph, we can store the per-node information
when routing in a simple `Vec` rather than a `HashMap`. This avoids
the overhead of hashing and table scanning entirely, for a nice
"simple" optimization win.
lightning/src/routing/gossip.rs
lightning/src/routing/router.rs
lightning/src/util/test_utils.rs