]> git.bitcoin.ninja Git - rust-lightning/commit
Align `PathBuildingHop` to 128b, now that we store them in a `Vec`
authorMatt Corallo <git@bluematt.me>
Thu, 7 Dec 2023 23:40:26 +0000 (23:40 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 10 Jul 2024 01:31:48 +0000 (01:31 +0000)
commit5fb66377eff721d1a26be504b91f46afc689631d
tree2c9922e2785d1e47ce85e56cfe0509a9be685176
parent43d250dadcdad54836eacd8b447bb36d5c8e6cb5
Align `PathBuildingHop` to 128b, now that we store them in a `Vec`

Now that `PathBuildingHop` is stored in a `Vec` (as `Option`s),
rather than `HashMap` entries, they can grow to fill a full two
cache lines without a memory access performance cost. In the next
commit we'll take advantage of this somewhat, but here we update
the assertions and drop the `repr(C)`, allowing rust to lay the
memory out as it wishes.
lightning/src/routing/router.rs