Re: Seeking Endorsement: Boost.int128
Matt Borland via Boost <[email protected]>
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <zvdoxnV-XuG2IqPDqdhOobHmHljyZ2BVFTrpfUs2mab_D3-0BYbShZJb8uJsZGpTewwBy4GYGnDW8YffRMSKWCNO_OFxrk_RmoOGsKlrW-E=@mattborland.com> |
> > Which Multiprecision backend did you use for the benchmarks (cpp, gmp, tom)? > I used the fixed-precision cpp_int types as they are the most closely analogous, and they are portable for those that want to run the benchmarks themselves. > > > > A couple of questions that I anticipate: > > > > Why do we need this if we already have Boost.Multiprecision? > > > > > > An old compliant against Boost.Multiprecision is that the 128-bit integer types are not 16 bytes [3]. The 128-bit integer types are also incident to the arbitrary precision type rather than a dedicated implementation. This allows int128 to improve performance in places that Multiprecision can't or shouldn't which is reflected in the benchmarks [2]. > > > > Should this go in Core (or other existing lib)? > > > > I talked with Peter about this a while back, but int128 was already getting too big at the time. Now int128's include/ directory has a higher sloccount than core's, so it makes even less sense. I would rather it not go into Multiprecision, as int128 would have a module weight of up to 5 (optional dependencies), whereas Multiprecision has a module weight of 25 [4]. The design is fundamentally different than the types used in Multiprecision as well (All types are backends into a master template called number for compatibility) > > > I appreciate the detailed explanations here. However, I can imagine users of Multiprecision might grumble about having to use two different libraries to get, for example, extended float and int28. I would emphasize the benefits in the docs to try to mitigate this. > Can do. I actually have one convert from Multiprecision to int128 from a recent iteration of the issue asking about cpp_int being 24 bytes. Matt _______________________________________________ Boost mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/[email protected]/message/GLUXNHBDCBND5MIHRB3XHULLG3R2S55K/
publickey - [email protected] - 0xC1382EAD.asc
(application/pgp-keys, 653 B)
-----BEGIN PGP PUBLIC KEY BLOCK----- xjMEX2wgdBYJKwYBBAHaRw8BAQdAUHOh0KpbZCszhdvKztWj4C6FR1ozMBQE waBi3m2PJHLNK21hdHRAbWF0dGJvcmxhbmQuY29tIDxtYXR0QG1hdHRib3Js YW5kLmNvbT7CjwQQFgoAIAUCX2wgdAYLCQcIAwIEFQgKAgQWAgEAAhkBAhsD Ah4BACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaVWuwEA77rm OA4TB6Xxe6q8gI42bEICMhMyZKSMcakz39/djYkBAMJOG+IGQC/d0n3dsl10 Kg/oxX88kFO1oPKn4/XW+ToBzjgEX2wgdBIKKwYBBAGXVQEFAQEHQOsmo6wR UuXRAvFIiqmQkzYrPyvKYKna2z4ZtmnTQMkMAwEIB8J4BBgWCAAJBQJfbCB0 AhsMACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaWUJwEA5G0c ZRnG5WGNErI+y90iQrTv02i4Ivhv7twoFcLD/zwA/jKypw+vehE99mEj1/uI EkoDFlNzQZqNldbjRcPyI5UH =462S -----END PGP PUBLIC KEY BLOCK-----
signature.asc
(application/pgp-signature, 343 B)
-----BEGIN PGP SIGNATURE----- Version: ProtonMail wrsEARYKAG0FgmnxDrEJEFmBWlVCFaWlRRQAAAAAABwAIHNhbHRAbm90YXRp b25zLm9wZW5wZ3Bqcy5vcmclrhXsst/YcntlEWg2yuMnhCqF9U2tj4xQEt4L JHRnjxYhBME4Lq03KB8G3UmyLFmBWlVCFaWlAADC7AD9E+S51vSm7SOP+tT4 3yudjHl4eUoIuO9e6hLEKUMElVYBAKPxapP6XohIoFJZXsTjGonegMD7/TNa cREL4YcxQOwP =tAHt -----END PGP SIGNATURE-----