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/2005-December/059107.html below:

[Python-Dev] deque alternative

[Python-Dev] deque alternativeArmin Rigo arigo at tunes.org
Tue Dec 27 16:12:54 CET 2005
Hi Christian,

On Mon, Dec 26, 2005 at 01:38:37PM +0100, Christian Tismer wrote:
> I don't think your code has to decide about this. The power lies
> in the fact that you don't specify that, but just use the list
> in a different way. We do this in the PyPy implementation;
> right now it is true that we have a static analysis, but a JIT
> is to come, and I'm pretty sure it will try to use an array
> until something gets used like a list.

You are mentioning confusingly many levels of PyPy for this argument.
This is not directly related to static analysis nor to the JIT.  The
point is just that while a Python program runs, the implementation can
decide to start using a deque-like structure instead of a zero-based
array for a given user list.  This can be done in any implementation of
Python; both in PyPy and in CPython it would be done by adding checks
and cases in the code that implements list objects.

As much as I like this approach I fear that it will be rejected for
CPython, as e.g. lazily concatenated string objects were, on grounds of
code obfuscation and unpredictability of performance.  But it's PyPy's
goal to experiment here :-)


A bientot,

Armin
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