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/2008-December/084228.html below:

[Python-Dev] Allocation of shape and strides fields in Py_buffer

[Python-Dev] Allocation of shape and strides fields in Py_buffer [Python-Dev] Allocation of shape and strides fields in Py_bufferAntoine Pitrou solipsis at pitrou.net
Thu Dec 11 01:35:05 CET 2008
Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes:
> 
> This was a deliberate decision -- in fact I argued for it myself.
> The buffer interface is meant to be a minimal-overhead way for
> C code to get at the underlying data. Requiring allocation of
> a PyObject would be too expensive.

Tuples are used everywhere throughout the interpreter and yet they are proper
PyObjects. Even simple integers are often wrapped into PyLong objects (see the
getitem/setitem protocol in Py3k). I doubt Py_buffers are more critical for
performance than tuples and integers are.



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