Author inada.naoki
Recipients arigo, aronacher, eric.snow, inada.naoki, rhettinger, serhiy.storchaka
Date 2017-09-11.05:59:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Original Raymond's design didn't preserve ordering during deletion.

Original Raymond's pure Python implementation rebuilds index table.
Without it, proving can be very long or infinite loop.
See L89-92 in
Strictly speaking, it's worst case is O(n) too.

Raymond's compact dict allocates entry table and index table separately.
I want to allocate them at once, as one memory block.
It makes better cache hit ratio on small dict.

That's why I choose "preserve insertion order" over "compaction".
Since index table and entry table grow at same time, rebuilding
index table and entry table at once makes sense to me.

Anyway, "namespace is ordered" is Python's language spec now.

class C:
    a = 1
    b = 2
    c = 3
    del a

In this case, C's namespace should {"b": 2, "c": 3}, not {"c": 3, "b": 2}.
Date User Action Args
2017-09-11 05:59:27inada.naokisetrecipients: + inada.naoki, arigo, rhettinger, aronacher, eric.snow, serhiy.storchaka
2017-09-11 05:59:27inada.naokisetmessageid: <>
2017-09-11 05:59:27inada.naokilinkissue31265 messages
2017-09-11 05:59:26inada.naokicreate