-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
add string.insert benchmarks #67281
add string.insert benchmarks #67281
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Curious. Is my reasoning off, or is it a transient cache problem? |
d76e74c
to
06a2503
Compare
r? @RalfJung I figure this should be within your area of expertise. |
Sorry, I am already swamped and have been sick since Thursday... I'd prefer if you could pick another reviewer. |
This should be correct, but I would like some motivation in the form of measurable improvements, otherwise I'm not inclined to make unsafe code any more subtle than it has to be. After some experimentation on the playground I'm skeptical whether there is such a benefit at the moment. Currently, That said, things would change if |
06a2503
to
943f833
Compare
Added benchmarks. Local results: Before:
After:
So there appears to be a small benefit, but nothing spectacular. |
I don't see any improvement there, the difference is within the variance.
|
I agree that the benchmarks here look like noise, but this seems fine to land anyway. Can you remove the |
943f833
to
5d00afe
Compare
|
Ah ok, given that, sounds like we should close this? Or maybe add the benchmarks but not code changes? |
5d00afe
to
c6321a4
Compare
Removed the change, left the benchmarks, edited the PR title & comment. |
@bors: r+ |
📌 Commit c6321a4 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
…xcrichton add string.insert benchmarks This adds benchmarks for `String::insert` and `String::insert_str`
Rollup of 7 pull requests Successful merges: - rust-lang#66670 (Normalize ident) - rust-lang#66755 (Remove a const-if-hack in RawVec) - rust-lang#67127 (Use structured suggestion for disambiguating method calls) - rust-lang#67281 (add string.insert benchmarks) - rust-lang#67328 (Remove now-redundant range check on u128 -> f32 casts) - rust-lang#67392 (Fix unresolved type span inside async object) - rust-lang#67421 (Fix internal documentation typo) Failed merges: r? @ghost
Rollup of 7 pull requests Successful merges: - rust-lang#66670 (Normalize ident) - rust-lang#66755 (Remove a const-if-hack in RawVec) - rust-lang#67127 (Use structured suggestion for disambiguating method calls) - rust-lang#67281 (add string.insert benchmarks) - rust-lang#67328 (Remove now-redundant range check on u128 -> f32 casts) - rust-lang#67392 (Fix unresolved type span inside async object) - rust-lang#67421 (Fix internal documentation typo) Failed merges: r? @ghost
Rollup of 7 pull requests Successful merges: - rust-lang#66670 (Normalize ident) - rust-lang#66755 (Remove a const-if-hack in RawVec) - rust-lang#67127 (Use structured suggestion for disambiguating method calls) - rust-lang#67281 (add string.insert benchmarks) - rust-lang#67328 (Remove now-redundant range check on u128 -> f32 casts) - rust-lang#67392 (Fix unresolved type span inside async object) - rust-lang#67421 (Fix internal documentation typo) Failed merges: r? @ghost
…xcrichton add string.insert benchmarks This adds benchmarks for `String::insert` and `String::insert_str`
Rollup of 6 pull requests Successful merges: - #67253 (Add more delegations to the fmt docs and add doctests) - #67281 (add string.insert benchmarks) - #67351 (Set release channel on non-dist builders) - #67421 (Fix internal documentation typo) - #67432 (Fix toolstate history format) - #67436 (Correct the todo! stabilization version) Failed merges: r? @ghost
Allow added string.insert benchmarks to compile Allow the code added by rust-lang#67281 to compile. (symptons listed [in internals forum](https://internals.rust-lang.org/t/x-py-how-to-benchmark-liballoc/11635)) r? @llogiq
Allow added string.insert benchmarks to compile Allow the code added by rust-lang#67281 to compile. (symptons listed [in internals forum](https://internals.rust-lang.org/t/x-py-how-to-benchmark-liballoc/11635)) r? @llogiq
This adds benchmarks for
String::insert
andString::insert_str