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

from_utf8_lossy is 10x slower than std #406

Open
turalcar opened this issue Sep 9, 2024 · 1 comment
Open

from_utf8_lossy is 10x slower than std #406

turalcar opened this issue Sep 9, 2024 · 1 comment

Comments

@turalcar
Copy link

turalcar commented Sep 9, 2024

For typical cases (small mostly ASCII strings) CompactString::from_utf8_lossy(s) is significantly (~10x) slower than CompactString::from(String::from_utf8_lossy(s))

@ParkMyCar
Copy link
Owner

Thanks for the reporting the issue! From what I remember the implementation was ported from the stdlib, although I don't think much time has been spent making sure it's as performant, I'll have to dive in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants