Comparison to Boost.Multiprecision
An easy question to ask is why this is a separate library from Boost.Multiprecision. There are several reasons why:
-
The goal is for this library to be extremely lightweight. The module weight of this library will be 5, whereas Boost.Multiprecision is 25
-
Fundamentally, the designs of the types are different. In Boost.Multiprecision,
int128anduint128are incident to the arbitrary precision integercpp_int, not a specifically designed type. In this library bothint128_tanduint128_tare their own classes with individually implemented operators to maximize performance. -
In Boost.Multiprecision all types are based on a high-level template
numberto allow interoperability with each other. Again, bothint128_tanduint128_tare their own classes, and are designed to work with and act like the built-in integer types.