3 ms·
Does Go perform interning of strings?
by Yoric 4y ago
Does Go perform interning of strings?
- Groxx 4y agoCompile-time strings, I think so? In that all identical strings simply point to the same data. Otherwise no.
- xh-dude 4y agoUse of Go’s runtime reflection to produce a struct definition would result in one instance of the key string, many instances of the numeric value This approach is available/implemented in the standard library, the whole story with JSON in Go is includes a few different approaches but this is definitely anticipated.