[Python-Dev] 64 bit units in PyLong (original) (raw)
Siyuan Ren netheril96 at gmail.com
Mon Jul 3 00:52:16 EDT 2017
- Previous message (by thread): [Python-Dev] 3.6.2 update: 3.6.2rc2 coming
- Next message (by thread): [Python-Dev] 64 bit units in PyLong
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The current PyLong implementation represents arbitrary precision integers in units of 15 or 30 bits. I presume the purpose is to avoid overflow in addition , subtraction and multiplication. But compilers these days offer intrinsics that allow one to access the overflow flag, and to obtain the result of 64 bit multiplication as a 128 bit number. Or at least on x86-64, which is the dominant platform. Any reason why it is not done? If it is only because no one bothers, I may be able to do it. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170703/0d1c6c09/attachment.html>
- Previous message (by thread): [Python-Dev] 3.6.2 update: 3.6.2rc2 coming
- Next message (by thread): [Python-Dev] 64 bit units in PyLong
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]