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/2011-October/114074.html below:

[Python-Dev] Identifier API

[Python-Dev] Identifier APIGeorg Brandl g.brandl at gmx.net
Fri Oct 14 07:44:41 CEST 2011
Am 14.10.2011 00:30, schrieb Victor Stinner:
> Le jeudi 13 octobre 2011 03:34:00, Victor Stinner a écrit :
>> > We would need a new format for Py_BuildValue, e.g. 'a' for ASCII string.
>> > Later we can add new functions like _PyDict_GetASCII().
>> 
>> The main difference between my new "const ASCII" string idea and
>> PyIdentifier is the lifetime of objects. Using "const ASCII" strings, the
>> strings are destroyed quickly (to not waste memory), whereas PyIdentifiers
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>> are intern strings and so they are only destroyed at Python exit.
>> 
>> I don't know if "const ASCII" strings solve a real issue. I implemented my
>> idea. I will do some benchmarks to check if it's useful or not :-)
> 
> Ok, I did some tests: it is slower with my PyConstASCIIObject. I don't 
> understand why, but it means that the idea is not interesting because the code 
> is not faster.

I think you've already given the answer above...

Georg

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