Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2755)

Issue 14105: [issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by dickinsm
Modified:
14 years, 8 months 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
Martin v. Löwis
http://codereview.appspot.com/14105/diff/1/11 File Doc/library/sys.rst (right): http://codereview.appspot.com/14105/diff/1/11#newcode418 Line 418: A struct sequence that holds information about Python's ...
15 years, 9 months ago (2009-02-17 22:39:17 UTC) #1
dickinsm
http://codereview.appspot.com/14105/diff/1/11 File Doc/library/sys.rst (right): http://codereview.appspot.com/14105/diff/1/11#newcode418 Line 418: A struct sequence that holds information about Python's ...
15 years, 9 months ago (2009-02-18 17:06:33 UTC) #2
Martin v. Löwis
On all other follow-ups I agree, so no further comments there. http://codereview.appspot.com/14105/diff/1/2 File Python/marshal.c (right): ...
15 years, 9 months ago (2009-02-18 21:27:04 UTC) #3
dickinsm
15 years, 9 months ago (2009-02-19 09:42:14 UTC) #4
http://codereview.appspot.com/14105/diff/1/2
File Python/marshal.c (right):

http://codereview.appspot.com/14105/diff/1/2#newcode160
Line 160: w_long((long)(Py_SIZE(ob) > 0 ? l : -l), p);
On 2009/02/18 21:27:04, Martin v. Löwis wrote:
> Ok, so I'd waive this for this patch; please do create a separate report.

Done.

http://bugs.python.org/issue5308
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b