A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/023791.html below:

[Python-Dev] iterzip()

[Python-Dev] iterzip()Tim Peters tim.one@comcast.net
Mon, 29 Apr 2002 15:57:39 -0400
[Tim, on

def juststore(x):
    for i in x: x[i] = 0

def justtups(x):
    for i in x: 0,

def storetups(x):
    for i in x: x[i] = 0,

where x is always range(1000000)]
> ...
>  juststore   0.93
>   justtups   0.58
>  storetups   7.61
>
> ...
> It's a Mystery to me so far.  How does it act on Linux?

Well, it's not pymalloc here.  pymalloc is happier recycling memory than
grabbing arena after arena of persistent memory (it doesn't do what you
think here <wink> -- it creates a pool's free list "lazily", not all at
once, and that takes time).  If I recompile with pymalloc disabled, the
storetups time increases to 9.65 seconds.  So despite pymalloc's reluctance
to carve up memory until absolutely needed, it's still a lot faster than
using the system malloc for small tuples on this box.





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