Skip to content

Transparent arbitrary-precision integers in the runtime #1558

@lukaszcz

Description

@lukaszcz

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions