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

Transparent arbitrary-precision integers in the runtime #1558

Open
lukaszcz opened this issue Sep 28, 2022 · 1 comment
Open

Transparent arbitrary-precision integers in the runtime #1558

lukaszcz opened this issue Sep 28, 2022 · 1 comment
Labels
enhancement New feature or request runtime
Milestone

Comments

@lukaszcz
Copy link
Collaborator

Three representations of integers with transparent automatic conversion between them.

  • Unboxed 31 bit ints.
  • Boxed 64 bit ints.
  • GMP-based arbitrary-precision integers.
    • Implemented with slightly modified mpz part of mini-gmp added to the runtime sources.
    • Requires malloc-like allocator in the runtime #1557 for GMP memory management.
    • Give the user an option to link with the full GMP library (much better performance: up to 10x faster for numbers with up to a few hundred bits, asymptotically faster for larger numbers).
@lukaszcz
Copy link
Collaborator Author

We can't actually use mini-GMP because it's on LGPL and we don't want that in the runtime. We could use bigz instead (it's on simplified BSD): https://github.com/starseeker/bigz/tree/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request runtime
Projects
None yet
Development

No branches or pull requests

2 participants