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

Insight on original performance difference #1

Open
polarathene opened this issue Oct 6, 2023 · 1 comment
Open

Insight on original performance difference #1

polarathene opened this issue Oct 6, 2023 · 1 comment

Comments

@polarathene
Copy link

Your article on the topic was the third search result that came up for me. I think you clarified it well with semantics, thanks 😁


Just adding some information regarding this part of your write-up:

the first result it gives me was [Converting &str: to_string vs to_owned (with two benchmarks)][3]. I read the post and coundn't believe the performance difference
they said. After more researches I realized that the post is wrong (or maybe is
outdated becuase it was posted in 2016), and I worried about there might be other

There is this comment from 2016 on the topic:

Now that specialization for str::to_string() has landed, we can safely say that to_string() has the same performance as to_owned()

The post you came across was likely accurate until the newer rust release with that optimization landed 👍

@chawyehsu
Copy link
Owner

oh cool!

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