r/cpp • WG21 Member • Aug 18 '26

P4444: std::big_int

https://isocpp.org/files/papers/D4444R0.html

Hey folks! Matt Borland, Christopher Kormanyos, and I are working on bringing infinite-precision integers to C++29. We now have a D4444R0 draft of a paper that should be in the next mailing.

We could really use some feedback so that the published R0 is as polished as possible. Any thoughts on the paper and on the reference implementation are greatly appreciated.

It would also be very helpful if you tested out whether our big_int implementation works for you. We're in need of some real deployment experience. If you're currently using Boost.Multiprecision, the library should be a drop-in replacement for cpp_int for the most part.

177 Upvotes

85 comments sorted by

View all comments

Show parent comment

9

u/unchangeableusername Aug 18 '26

Wasn't std::regex heavily based on Boost.Regex though? In terms of regex search performance (I'm writing a regex library of my own and so have benchmarks to compare), Boost.regex is between 40% and 6800% faster than the Libstdc++ implementation of std::regex (700% faster on average) for the test cases I have.

Surely this is just a quality of implementation issue (that the implementers won't fix because it'll break ABI) and not a problem with the standard itself?

5

u/azswcowboy Aug 18 '26

You’re correct, it’s a quality of implementation issue not a specification problem. std library vendors are very good, but every now and then a non optimal implementation occurs.