Move in-inner-scoring-loop if out to the top level
authorMatt Corallo <git@bluematt.me>
Tue, 12 Dec 2023 16:53:31 +0000 (16:53 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 16 Dec 2023 01:50:04 +0000 (01:50 +0000)
commit41f747bc63a232db98d45cfd79e9b3947c67a588
treeb6dd7499f71bf603bee27ebe233516f99820687e
parenta47faa21c09a32596ebd6cffec0d9876c9da3d06
Move in-inner-scoring-loop if out to the top level

When scoring channels, walking the historical buckets ends up being
the vast majority of our time. While LLVM is smart enough to pull
some conditionals out of the inner loop, we shouldn't make LLVM do
the work, and avoiding it can let us optimize the algorithm
somewhat in the coming commits.
lightning/src/routing/scoring.rs