[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. - Code Review (original) (raw)

Can't Edit Can't Publish+Mail Start Review Created: 16 years, 2 months ago by dickinsm Modified: 15 years, 1 month ago Reviewers: Martin v. Löwis CC: report_bugs.python.org Base URL: http://svn.python.org/view/\*checkout\*/python/branches/py3k/ Visibility: Public. Description This patchset makes it possible for Python to use base 2**30 instead of base 2**15 for its internal representation of arbitrary-precision integers. The aim is both to improve performance of integer arithmetic, and to make possible some additional optimizations (not currently included in this patchset). The patchset includes: - a new configure option --enable-big-digits - a new structseq sys.int_info giving information about the internal representation See http://bugs.python.org/issue4258 for the related tracker discussion. Patch Set 1# Total comments: 20 Patch Set 2 : Updated patchset to address some of Martin's comments# Patch Set 3 : Fix single typo in PC/pyconfig.h# Patch Set 4 : Regenerate configure and pyconfig.h.in changes# Patch Set 5 : Add x_divrem fixes and optimizations# Patch Set 6 : Add extra tests for divison corner cases# Patch Set 7 : Remove optimizations; enable big digits by default only on 64-bit# Unified diffs Side-by-side diffs Delta from patch set Stats (+834 lines, -68 lines) Patch M Doc/library/sys.rst View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download M Include/longintrepr.h View 1 2 3 4 5 6 1 chunk +53 lines, -15 lines 0 comments Download M Include/longobject.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download M Include/pyport.h View 1 2 3 4 5 6 1 chunk +51 lines, -0 lines 0 comments Download M Lib/test/test_long.py View 1 2 3 4 5 6 2 chunks +30 lines, -1 line 0 comments Download M Lib/test/test_sys.py View 1 2 3 4 5 6 6 chunks +14 lines, -9 lines 0 comments Download M Objects/longobject.c View 1 2 3 4 5 6 6 chunks +59 lines, -3 lines 0 comments Download M PC/pyconfig.h View 1 2 3 4 5 6 1 chunk +36 lines, -0 lines 0 comments Download M Python/marshal.c View 1 2 3 4 5 6 5 chunks +105 lines, -40 lines 0 comments Download M Python/sysmodule.c View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download M configure View 1 4 5 6 3 chunks +413 lines, -0 lines 0 comments Download M configure.in View 1 2 3 4 5 6 2 chunks +23 lines, -0 lines 0 comments Download M pyconfig.h.in View 1 2 3 4 5 6 4 chunks +29 lines, -0 lines 0 comments Download Messages Total messages: 4 Expand All Messages | Collapse All Messages Expand All Messages Collapse All Messages