[Python-Dev] More compact dictionaries with faster iteration (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Tue Dec 11 12:12:10 CET 2012
- Previous message: [Python-Dev] More compact dictionaries with faster iteration
- Next message: [Python-Dev] More compact dictionaries with faster iteration
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yet some comments about your Python implementation.
Don't use "is FREE" and "is DUMMY" as array doesn't preserve identity.
Wrong limits used in _make_index(): 128 overflows 'b', 65536 overflows 'h' and 'l' can be not enough for ssize_t.
round_upto_powtwo() can be implemented as 1 << n.bit_length().
i * 5 faster than (i << 2) + i on Python.
You can get rid of "size" attribute and use len(self.keylist) instead.
- Previous message: [Python-Dev] More compact dictionaries with faster iteration
- Next message: [Python-Dev] More compact dictionaries with faster iteration
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]