Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SSO in SharedString #273

Open
loyd opened this issue Feb 15, 2022 · 1 comment
Open

Use SSO in SharedString #273

loyd opened this issue Feb 15, 2022 · 1 comment
Labels
C-core Component: core functionality such as traits, etc. E-intermediate Effort: intermediate. T-enhancement Type: enhancement. T-experiment Type: experiment.

Comments

@loyd
Copy link

loyd commented Feb 15, 2022

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?

@tobz
Copy link
Member

tobz commented Feb 15, 2022

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.

@tobz tobz added C-core Component: core functionality such as traits, etc. E-intermediate Effort: intermediate. T-enhancement Type: enhancement. T-experiment Type: experiment. labels Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-core Component: core functionality such as traits, etc. E-intermediate Effort: intermediate. T-enhancement Type: enhancement. T-experiment Type: experiment.
Projects
None yet
Development

No branches or pull requests

2 participants