|
Ran
|
Jobs
1
|
Files
93
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#3002: Optimize base58 on small inputs <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/d05723c4011912d9334a5261df2d714b2406cb25">d05723c40 Optimize base58 on small inputs (Martin Habovstiak) Pull request description: Most base58 strings in Bitcoin are somewhat short. There was previously an "optimization" putting part of the input on stack which was removed in #2759 because it actually made the code slower. This appears to be mostly because of branches caused by using `iter::Chain`. Manually splitting the iterations into two helped bring the performance close to what #2759 achieved but that still wasn't worth it. But given that we know the input length in many cases (it's just a slice) we can determine whether it'll fit a buffer upfront and then just call different functions which don't have the branches in loops. To avoid having two functions this uses generics instead. Further, we increase the buffer length to 128 and use `ArrayVec` from `internals` which internally avoids initializing the buffer thanks to `MaybeUninit` In total this increases performance by around 4% on my machine. ACKs for top commit: tcharding: ACK d05723c4011912d9334a5261df2d714b2406cb25 apoelstra: ACK d05723c4011912d9334a5261df2d714b2406cb25 Tree-SHA512: a12fa15ef5651a9fe077584cd4092b8b83d
50 of 51 new or added lines in 1 file covered. (98.04%)
19586 of 23571 relevant lines covered (83.09%)
15671.45 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 9895044066.1 | 0 |
83.09 |
GitHub Action Run |