Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge rust-bitcoin#2436: Add unchecked variants to Amount and SignedA…
…mount df1d2f6 Add unchecked variants to Amount and SignedAmount (yancy) Pull request description: The checked variants have worse performance than the unchecked variants due to the additional branching operations. To improve performance where overflow is either not possible or not a concern, unchecked variants of `Amount` and `SignedAmount` are introduced for addition, subtraction and multiplication. Note, it seems the default behavior for the test framework is to panic on overflow, so I haven't figured out a good way to add tests for this. Marking as a draft for now. closes: rust-bitcoin#2434 ACKs for top commit: Kixunil: ACK df1d2f6 apoelstra: ACK df1d2f6 gonna go ahead and merge this, we can revisit if necessary when we look at `units` overflow behavior in general Tree-SHA512: 3fbb0ec81a758b350569226c44e25f6ca49e551566bee83c05c1c2b343874ef657d63a36b5f51c41582d8a8e36466275c574ebff6d363ed7c112ac8b4d5376fa
- Loading branch information