Get the latest tech news

Why German Strings Are Everywhere


German Strings Strings are conceptually very simple: It’s essentially just a sequence of characters, right? Why, then, does every programming language have their own slightly different string implementation? It turns out that there is a lot more to a string than “just a sequence of characters”1. We’re no different and built our own custom string type that is highly optimized for data processing. Even though we didn’t expect it when we first wrote about it in our inaugural Umbra research paper, a lot of new systems adopted our format.

Also, simultaneously accessing and modifying a string concurrently can lead to data races if we don’t use expensive locking techniques or think very carefully about our application. Besides the obvious advantage of saving a third of the overhead over std::string by dropping the capacity field, it also allows us to pass strings in function calls via two registers instead of putting them on the stack. The obvious advantage is that we save the 64 bits for the capacity field and can tightly pack payloads of different strings without gaps.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of German

German

Photo of German Strings

German Strings

Related news:

News photo

German Navy To Replace Aging 8-Inch Floppy Drives With an Emulated Solution

News photo

German Group Agrees to Buy Hydrogen From Egypt as of 2027

News photo

Leonhard Euler's Letters to a German Princess