Interning (computer science)
In computer science, interning is re-using objects of equal value on-demand instead of creating new objects.[src] This creational pattern is frequently used for numbers and strings in different programming languages.[src] In many object-oriented languages such as Python, even primitive types such as integer numbers are objects.[src] To avoid the overhead of constructing a large number of integer objects, these objects get reused through interning.[src] For interning to work, the interned objects must be immutable, since state is shared between multiple variables.[src] String interning is a common application of interning, where many strings with identical values are needed in the same program.[src]
In computer science, interning is re-using objects of equal value on-demand instead of creating new objects.[src] This creational pattern is frequently used for numbers and strings in different programming languages.[src] In many object-oriented languages such as Python, even primitive types such as integer numbers are objects.[src] To avoid the overhead of constructing a large number of integer objects, these objects get reused through interning.[src] For interning to work, the interned objects must be immutable, since state is shared between multiple variables.[src] String interning is a common application of interning, where many strings with identical values are needed in the same program.[src]
12 sentences · 12 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Interning (computer science)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/interning-computer-science. Accessed 28 November 2026.
Chicago
"Interning (computer science)." encyclopegia.org. Accessed November 28, 2026. https://encyclopegia.org/wiki/interning-computer-science.
APA
encyclopegia.org. (2025). Interning (computer science). Retrieved November 28, 2026, from https://encyclopegia.org/wiki/interning-computer-science
Accessed November 28, 2026 · CC BY-SA 4.0 · citation page · JSON