On 4/28/26 19:02, Matt Borland via Boost wrote:
Dear All,
I am seeking endorsement for review of my library int128 [1]. The library requires only C++14, is header only, and has no mandatory dependencies. What does int128 provide? Two portable and performant types: a 128-bit signed integer and a 128-bit unsigned integer, as well as a standard library for them. The performance of these types have been tuned and tested on a variety of architectures to include: x64, x32, s390x, ARM64, ARM32, PPC64LE. Both of the types and most of their library functions also work inside CUDA kernels. Benchmarks against Boost.Multiprecision, Absl, MSVC's software 128-bit integers, and built-ins, are available [2].
I have mixed feelings about this. What I really want is a true std::int128_t using native CPU instructions that is a true integral type and can be used in switch statements. The proposed library looks good from a performance perspective, but that could all change when true 128 bit integer CPU instructions arrive, and as a class type it can't be used with switch statements. Despite my reservations, I endorse this library. It's available now, it runs on current CPUs, and I can always hide it behind a typedef so that I can switch to another int128 implementation when a true native one becomes available. -- Rainer Deyke - rainerd@eldwood.com