[Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154 (original) (raw)
Skip Montanaro skip at pobox.com
Wed Mar 17 17:29:41 EST 2004
- Previous message: [Python-Dev] Changes to PEP 327: Decimal data type
- Next message: [Python-Dev] A proposal has surfaced on comp.lang.python to redefine "is"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
raymond> * Added a freelist scheme styled after that for tuples. Saves
raymond> around 80% of the calls to malloc and free. About 10% of the
raymond> time, the previous dictionary was completely empty; in those
raymond> cases, the dictionary initialization with memset() can be
raymond> skipped.
% timeit.py 'd = {} ; d = {"a": 1}' 1000000 loops, best of 3: 1.66 usec per loop ... cvs up ... ... make ... % ./python.exe ~/local/bin/timeit.py 'd = {} ; d = {"a": 1}' 1000000 loops, best of 3: 1.23 usec per loop
Cool.
Skip
- Previous message: [Python-Dev] Changes to PEP 327: Decimal data type
- Next message: [Python-Dev] A proposal has surfaced on comp.lang.python to redefine "is"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]