A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-March/043180.html below:

[Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154

[Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154 [Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154Skip Montanaro skip at pobox.com
Wed Mar 17 17:29:41 EST 2004
    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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4