-
# Summary
Go 1.23 introduced string interning (https://pkg.go.dev/unique)
We use strings as enums all throughout the argo codebase, which in itself is quite alright, however they might take up a r…
-
In theory if I have a string I should be able to hash it and find the corresponding value in a `BTreeSet`, however in practice to find the value in the set I have to create a ComponentName which does …
-
The HIR in `apollo-compiler` uses `String` a lot. Cloning, hashing, and comparing those strings repeatedly has cost that can add up. This can be solved by having some kind of string "interning" that d…
-
I recently wrote some stuff receiving lots of dicts from python which I would then transform to turn the string hashtable keys into lisp keywords. It would be nice if I could do that on the hashtable…
-
Have you already considered string interning to reduce memory consumption?
I am aware of several approaches:
- `map[string]string` cons: it could grow forever
- https://github.com/go4org/intern…
-
-
We might want to intern identifier strings. String interning [speeds up comparisons](https://en.wikipedia.org/wiki/String_interning#Motivation), which are likely going to be very frequent during vario…
-
to optimize RAM usage
-
FYI: in pkg/pool/intern_test.go you could verify that the strings got interned correctly by using the following function, which passes go vet's scrutiny:
```
func identicalStrings(s1, s2 string) boo…
-
### Is your proposal related to a problem?
We currently have interning in Receive under a feature flag. It works but it could be improved a lot. We still allocate memory for each duplicate and then…