Open oscarbenjamin opened 4 months ago
It looks like Python 3.13 will provide public C API for efficiently converting to and from a PyLong. These should be compatible with mpz_import/mpz_export rather than converting between hex strings:
PyLong
mpz_import/mpz_export
https://github.com/python/cpython/pull/121339
https://github.com/flintlib/python-flint/blob/430b8e50f4d8e697d4f5c7666d7b75f3e440a260/src/flint/types/fmpz.pxd#L15-L23 https://github.com/flintlib/python-flint/blob/430b8e50f4d8e697d4f5c7666d7b75f3e440a260/src/flint/types/fmpz.pyx#L16-L27
It looks like Python 3.13 will provide public C API
Nit: 3.14. Maybe.
It looks like Python 3.13 will provide public C API for efficiently converting to and from a
PyLong
. These should be compatible withmpz_import/mpz_export
rather than converting between hex strings:https://github.com/python/cpython/pull/121339
https://github.com/flintlib/python-flint/blob/430b8e50f4d8e697d4f5c7666d7b75f3e440a260/src/flint/types/fmpz.pxd#L15-L23 https://github.com/flintlib/python-flint/blob/430b8e50f4d8e697d4f5c7666d7b75f3e440a260/src/flint/types/fmpz.pyx#L16-L27