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/2002-July/026089.html below:

[Python-Dev] Alternative implementation of string interning

[Python-Dev] Alternative implementation of string interning [Python-Dev] Alternative implementation of string interningOren Tirosh oren-py-d@hishome.net
Mon, 1 Jul 2002 16:18:41 -0400
http://python.org/sf/576101 

Interning is done using a flag instead of a pointer (3 bytes less). The 
ob_sinterned pointer was most of the time either NULL or pointing to the 
same object.  Cases where it pointed to another object were rare and the 
code that was cheching for this case was not effective.

Interned strings are no longer immortal.  They die when their refcnt
reaches 0 just like any other object.  The reference from the interned dict
will not keep them alive longer than necessary.

Can anyone explain why they were implemented with a pointer in the first
place? Barry?

	Oren




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