metrics
metrics copied to clipboard
Use SSO in `SharedString`
Shouldn't name/labels use SmartString
inside? Almost all dynamic label values in my production fit in 23 bytes. Also, values of u64
also fit in 23 bytes. IPv4+port also fits into 23 bytes.
metrics
already have custom Cow
implementation, what about altering the Owned
type to SmartString
?
I've never gotten around to benchmarking it, but I wouldn't be against such a change since it does seem likely to provide a benefit in cases of short strings.