Skip to content

liballoc: mark str.to_owned() and String::from(&str) as #[inline].#54613

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:string_from_inline_53681
Oct 9, 2018
Merged

liballoc: mark str.to_owned() and String::from(&str) as #[inline].#54613
bors merged 1 commit into
rust-lang:masterfrom
matthiaskrgr:string_from_inline_53681

Conversation

@matthiaskrgr

Copy link
Copy Markdown
Member

Fixes #53681

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @bluss

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 27, 2018
@matthiaskrgr

Copy link
Copy Markdown
Member Author

I didn't notice any benchmarks regressing and it size increase of binaries seem to be below 1% in average but perhaps this should get a perf run anyway, just to be extra sure.

@nagisa

nagisa commented Sep 27, 2018

Copy link
Copy Markdown
Member

@bors try

@bors

bors commented Sep 27, 2018

Copy link
Copy Markdown
Collaborator

⌛ Trying commit d24070b with merge 02d7f80...

bors added a commit that referenced this pull request Sep 27, 2018
liballoc: mark str.to_owned() and String::from(&str) as #[inline].

Fixes #53681
@bors

bors commented Sep 27, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-travis
State: approved= try=True

@nagisa

nagisa commented Sep 27, 2018

Copy link
Copy Markdown
Member

@rust-timer build 02d7f80

@rust-timer

Copy link
Copy Markdown
Collaborator

Insufficient permissions to issue commands to rust-timer.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@rust-timer build 02d7f80

@rust-timer

Copy link
Copy Markdown
Collaborator

Success: Queued 02d7f80 with parent e999ebd, comparison URL.

@matthiaskrgr

Copy link
Copy Markdown
Member Author

Hmm, still no perf results? 🤔

@Mark-Simulacrum

Copy link
Copy Markdown
Member

It looks like something went wrong during collection; @bors try

@nagisa

nagisa commented Sep 30, 2018

Copy link
Copy Markdown
Member

@rust-timer build 02d7f80

@rust-timer

Copy link
Copy Markdown
Collaborator

Success: Queued 02d7f80 with parent e999ebd, comparison URL.

@nagisa

nagisa commented Sep 30, 2018

Copy link
Copy Markdown
Member

Lets see if we can repeat rust-timer builds with results of previous try builds :)

@nagisa

nagisa commented Sep 30, 2018

Copy link
Copy Markdown
Member

Seems like not.

@bors retry

@bors

bors commented Sep 30, 2018

Copy link
Copy Markdown
Collaborator

⌛ Trying commit d24070b with merge 9aac7ca572e8ba96e99249a1a9d026331374f228...

@bors

bors commented Sep 30, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-travis
State: approved= try=True

@nagisa

nagisa commented Sep 30, 2018

Copy link
Copy Markdown
Member

@rust-timer build 9aac7ca572e8ba96e99249a1a9d026331374f228

@rust-timer

Copy link
Copy Markdown
Collaborator

Success: Queued 9aac7ca572e8ba96e99249a1a9d026331374f228 with parent 6310be4, comparison URL.

@nagisa

nagisa commented Sep 30, 2018

Copy link
Copy Markdown
Member

Overall a very slight increase in number of executed instructions, but that says very little.

@TimNN

TimNN commented Oct 9, 2018

Copy link
Copy Markdown
Contributor

Ping from triage @bluss / @nagisa: What is the status of this PR?

@nagisa

nagisa commented Oct 9, 2018

Copy link
Copy Markdown
Member

@bors r+

I’ll r+ this for the following reasons: while the slight increase in number of executed instructions exists, I believe it is a incorrect statistic to look at here. Inlining can easily go one way or the other on that, while also enabling other optimisations (like eliding allocations) that are important for naive code to be more efficient. The specific case in the code(expected) provided in the issue is a prime example of such enablement – LLVM elides the code for the allocation altogether, because the information necessary to do so is available in that context.

@bors

bors commented Oct 9, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit d24070b has been approved by nagisa

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2018
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 9, 2018
@bors

bors commented Oct 9, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d24070b with merge 96cafc5...

bors added a commit that referenced this pull request Oct 9, 2018
liballoc: mark str.to_owned() and String::from(&str) as #[inline].

Fixes #53681
@bors

bors commented Oct 9, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: nagisa
Pushing 96cafc5 to master...

@bors bors merged commit d24070b into rust-lang:master Oct 9, 2018
@matthiaskrgr matthiaskrgr deleted the string_from_inline_53681 branch February 29, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants