]> git.bitcoin.ninja Git - rust-lightning/commit
Add additional inline hints in serialization methods
authorMatt Corallo <git@bluematt.me>
Fri, 28 May 2021 14:07:39 +0000 (14:07 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 29 May 2021 23:03:46 +0000 (23:03 +0000)
commitbaeef9ce8bb5b0f7bdcf3ad2f60b30eb20b8a127
treec6e437f0518053418f2e5973b0c808fa42015ff7
parent5b6137c36d89603823b94af23919c5a968c4400b
Add additional inline hints in serialization methods

This substantially improves deserialization performance when LLVM
decides not to inline many short methods, eg when not building
with LTO/codegen-units=1.

Even with the default bench params of LTO/codegen-units=1, the
serialization benchmarks on an Intel 2687W v3 take:

test routing::network_graph::benches::read_network_graph  ... bench: 1,955,616,225 ns/iter (+/- 4,135,777)
test routing::network_graph::benches::write_network_graph ... bench: 165,905,275 ns/iter (+/- 118,798)
lightning/src/util/ser.rs