Interning (computer science) - Wikipedia
In computer science, interning is re-using objects of equal value on-demand instead of creating new objects. This creational pattern[1] is frequently used for numbers and strings in different programming languages. In many object-oriented languages such as Python, even primitive types such as integer numbers are objects. To avoid the overhead of constructing a large number of integer objects, these objects get reused through interning.[2] For interning to work the interned objects must be immutable, since state is shared between multiple variables. String interning is a common application of interning, where many strings with identical values are needed in the same program. Lisp introduced the notion of interned strings for its symbols. The LISP 1.5 Programmers Manual [3] describes a function called intern which either evaluates to an existing symbol of the supplied name, or if none exists, creates a new symbol of that name. This idea of interned symbols persists in more recent dialect
Interning (computer science) - Wikipedia Jump to content From Wikipedia, the free encyclopedia This article is about the computer science usage. For professional training programs, see Internship . Data structure for reusing strings In computer science, interning is re-using objects of equal value on-demand instead of creating new objects. This creational pattern [ 1 ] is frequently used for numbers and strings in different programming languages. In many object-oriented languages such as Python , even primitive types such as integer numbers are objects. To avoid the overhead of constructing a
related reading
- Fast and Simple Rust Internermatklad.github.io
- GitHub - pablogsal/python-horror-show: Strange and odd python snippets explainedgithub.com
- abseil / Performance Hintsabseil.io
- how I think when I think about programming - alice mazalicemaz.com
- Introduction · Crafting Interpreterscraftinginterpreters.com
- Destroy All Values: Designing Deinitialization in Programming Languages - Faultloregankra.github.io
- Glossary — Python 3.14.6 documentationdocs.python.org
- Immutable object - Wikipediaen.wikipedia.org
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- 10 Python Interview Questions for Senior Developersmedium.com
- Memoization - Wikipediaen.wikipedia.org
- (Re)writing an interpreter in Rust – Danny van Kootendannyvankooten.com