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

#13903: New shared-keys dictionary implementation

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 3 months ago by mark
Modified:
1 year ago
Reviewers:
martin, jimjjewett, benjamin
CC:
loewis, rhettinger, terry.reedy, gregory.p.smith, jcea, AntoinePitrou, haypo, pjenvey, Benjamin Peterson, Yury.Selivanov, Mark.Shannon, devnull_psf.upfronthosting.co.za, jcon, Jim.Jewett
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 21

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 #

Patch Set 8 #

Patch Set 9 #

Patch Set 10 #

Patch Set 11 #

Total comments: 99

Patch Set 12 #

Patch Set 13 #

Patch Set 14 #

Patch Set 15 #

Patch Set 16 #

Patch Set 17 #

Total comments: 3

Patch Set 18 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Objects/dictobject.c View 7 chunks +3 lines, -13 lines 0 comments Download

Messages

Total messages: 5
loewis
I skipped over some of the chunks due to shortage of time right now; I ...
1 year, 3 months ago #1
Jim.Jewett
Include/dictobject.h ==================== Reducing PyDict_MINSIZE from 8 to 4: I suspect this is probably a good ...
1 year, 3 months ago #2
Benjamin Peterson
I mostly have endless stylistic complaints. http://bugs.python.org/review/13903/diff/4567/16188 File Include/dictobject.h (right): http://bugs.python.org/review/13903/diff/4567/16188#newcode109 Include/dictobject.h:109: int _PyObjectDict_SetItem(PyTypeObject *tp, ...
1 year, 1 month ago #3
Mark.Shannon
All fixed. I've mostly followed Benjamin's recommendations with a few minor stylistic differences which I've ...
1 year ago #4
Mark.Shannon
1 year ago #5
Worthwhile addition. I've made a couple of comments.

http://bugs.python.org/review/13903/diff/4766/16903
File Objects/dictobject.c (right):

http://bugs.python.org/review/13903/diff/4766/16903#newcode265
Objects/dictobject.c:265: #define DK_DEBUG_DECREF _Py_DEC_REFTOTAL
_Py_REF_DEBUG_COMMA
I don't think we should use _Py_INC_REFTOTAL as the keys are not PyObjects.
Could you add a DK_RefTotal value, or does that make checking for leaks awkard?

http://bugs.python.org/review/13903/diff/4766/16903#newcode1269
Objects/dictobject.c:1269: DK_DECREF(oldkeys);
Could you replace the  free_keys_object() call with a macro that would include
the assert and DK_DEBUG_DECREF?
I would like to keep the assertion as (keys->dk_refcnt == 1)
for combined tables is an important invariant.

http://bugs.python.org/review/13903/diff/4766/16903#newcode1378
Objects/dictobject.c:1378: DK_DECREF(keys);
Ditto.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7