Files
xahaud/include/xrpl/beast
Alphonse Mousse 1f575aa3f6 Improve base_uint:
This commit makes several changes to the base_uint class, which was
originally taken from Bitcoin and has already been heavily modified
by Ripple engineers.

It introduces conditional widening of the internal limb type, going
from 32 to 64 bits if the requested number of bits is a multiple of
64. This change alone halves iteration counts for common operations
and, combined with use of add-with-carry compiler intrinsics, helps
leverage modern processor resources more effectively.

Other changes include:

 - Extracting the arithmetic operations into free helper functions
   which operate on the limb array directly.
 - Replacing the SFINAE-based is_contiguous_container trait with a
   byte_copy_source concept.
 - Rewriting the hex parsing around a consteval lookup table and a
   simple left-to-right loop, replacing the old shift-based nibble
   accumulator.
 - Using memmove instead of memcpy when copying to avoid UB in the
   unlikely case where the source and destination buffers overlap.
 - Eliminating a workaround in operator<=> to handle MacOS quirks.
 - Removing redundant parseHex overloads and introducing from_hex
   as a factory function.
 - Introducing a tagless_compare() for cross-tag comparison.
 - Adding noexcept, [[nodiscard]], and constexpr throughout.
2026-09-23 13:03:28 +10:00
..
2026-02-20 07:26:21 +09:00
2026-02-20 07:11:13 +09:00
2026-09-23 13:03:28 +10:00
2026-09-23 13:03:28 +10:00
2026-02-20 07:11:12 +09:00
2026-02-20 07:11:12 +09:00
2026-02-20 07:26:21 +09:00
2026-02-20 07:11:12 +09:00