We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Optimizing string usage in Go programs

Formale Metadaten

Titel
Optimizing string usage in Go programs
Serientitel
Anzahl der Teile
542
Autor
Lizenz
CC-Namensnennung 2.0 Belgien:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
Strings can seem like one of the most innocuous data structures in Go. Yet, they still play a significant role in most ubiquitous types of programs, such as text processors, in-memory key-value stores, DNS resolvers, or codecs. Their burden on the performance of such programs becomes especially pronounced in distributed systems and cloud-native environments, where the number of strings within an instance of the software can reach an order of millions or more. This gives rise to performance issues and bottlenecks, especially with regard to memory consumption. To provide answers to these problems, the talk will discuss several string-optimization techniques. To be more accessible for both beginner and intermediate levels, the talk will first state the problem and briefly introduce strings as a data structure, and will explain how strings look internally in Go. The core of the presentation will be dedicated to discussing operations with strings and how these can be optimized based on various techniques, such as string interning and string concatenation. The author will also share his experience and practical examples of open-source programs, where these techniques are being applied.