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/2010-November/105134.html below:

[Python-Dev] new buffer in python2.7

[Python-Dev] new buffer in python2.7 [Python-Dev] new buffer in python2.7Stefan Behnel stefan_ml at behnel.de
Mon Nov 1 09:45:06 CET 2010
Kristján Valur Jónsson, 27.10.2010 16:28:
> Notice how  a Slice object is generated.  Then a PyObject_GetItem() is
> done.  The salient code path is from apply_slice().  A slice object must
> be constructed and destroyed.

If slice object creation bothers you here, it might be worth using a free 
list in PySlice_New() instead of creating new slice objects on request.

Creating a slice of something is not necessarily such a costly operation 
that it dominates creating the slice object, so optimising the slice 
request itself sounds like a good idea.

You can take a look at how it's done in tupleoject.c if you want to provide 
a patch. Then, please open a bug tracker ticket and attach the patch there 
(and post a link to the ticket in this thread).

Stefan

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