Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMP vs boost::multiprecision as a p4-constraints dependency #137

Open
fruffy opened this issue Mar 20, 2024 · 1 comment
Open

GMP vs boost::multiprecision as a p4-constraints dependency #137

fruffy opened this issue Mar 20, 2024 · 1 comment
Labels
question Further information is requested

Comments

@fruffy
Copy link

fruffy commented Mar 20, 2024

P4C currently uses boost::multiprecision to calculate big integers. However, p4-constraints uses GMP. Is there a particular reason why GMP was chosen?

P4C used to have it, but ultimately went with boost because of license concerns. GMP uses GPL, although I do believe it is the variant with linking exceptions.

Reason I am asking is because once we integrate p4-constraints into P4C it would be nice to pick one of these big integer libraries.

@smolkaj
Copy link
Member

smolkaj commented Mar 20, 2024

We felt that GMP was the lighter/more stable dependency of the two, since Boost provides much more than just big integers. That said, this decision wasn't super well researched or anything, using Boost instead may be fine.

@smolkaj smolkaj added the question Further information is requested label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants