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

Change String to &'static str in ParseResult::Failure. #57461

Merged
merged 1 commit into from
Jan 13, 2019

Conversation

nnethercote
Copy link
Contributor

This avoids 770,000 allocations when compiling the html5ever
benchmark, reducing instruction counts by up to 2%.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(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 Jan 9, 2019
@nnethercote
Copy link
Contributor Author

@bors try

@bors
Copy link
Contributor

bors commented Jan 9, 2019

⌛ Trying commit 46fa818 with merge 2fc3e64...

bors added a commit that referenced this pull request Jan 9, 2019
…<try>

Change `String` to `&'static str` in `ParseResult::Failure`.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.
@Mark-Simulacrum
Copy link
Member

@bors delegate+

Presuming nothing unexpected comes up in perf, r=me

@bors
Copy link
Contributor

bors commented Jan 9, 2019

✌️ @nnethercote can now approve this pull request

@bors
Copy link
Contributor

bors commented Jan 9, 2019

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

@liigo
Copy link
Contributor

liigo commented Jan 9, 2019

avoids 770,000 allocations

wow! nice work!

@tesuji
Copy link
Contributor

tesuji commented Jan 9, 2019

@rust-timer build 2fc3e64

@rust-timer
Copy link
Collaborator

Insufficient permissions to issue commands to rust-timer.

@varkor
Copy link
Member

varkor commented Jan 9, 2019

@rust-timer build 2fc3e64

@rust-timer
Copy link
Collaborator

Success: Queued 2fc3e64 with parent 167ceff, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 2fc3e64

@nnethercote
Copy link
Contributor Author

So it's a clear improvement (up to 3% instruction count reduction) for html5ever, and no real change for anything else.

@nnethercote
Copy link
Contributor Author

@bors r=simulacrum

@bors
Copy link
Contributor

bors commented Jan 9, 2019

📌 Commit 46fa818 has been approved by simulacrum

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

bors commented Jan 10, 2019

⌛ Testing commit 46fa818 with merge 16c1d4587a6785ada863ef0ce4eb0143554dddb6...

@bors
Copy link
Contributor

bors commented Jan 10, 2019

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 10, 2019
@pietroalbini
Copy link
Member

@bors retry
AppVeyor... what's wrong with you today?

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2019
@tesuji
Copy link
Contributor

tesuji commented Jan 11, 2019

@bors retry

@bors
Copy link
Contributor

bors commented Jan 11, 2019

@lzutao: 🔑 Insufficient privileges: not in try users

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Jan 12, 2019
…tic-str, r=simulacrum

Change `String` to `&'static str` in `ParseResult::Failure`.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.
Centril added a commit to Centril/rust that referenced this pull request Jan 13, 2019
…tic-str, r=simulacrum

Change `String` to `&'static str` in `ParseResult::Failure`.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.
bors added a commit that referenced this pull request Jan 13, 2019
Rollup of 16 pull requests

Successful merges:

 - #57351 (Don't actually create a full MIR stack frame when not needed)
 - #57353 (Optimise floating point `is_finite` (2x) and `is_infinite` (1.6x).)
 - #57412 (Improve the wording)
 - #57436 (save-analysis: use a fallback when access levels couldn't be computed)
 - #57453 (lldb_batchmode.py: try `import _thread` for Python 3)
 - #57454 (Some cleanups for core::fmt)
 - #57461 (Change `String` to `&'static str` in `ParseResult::Failure`.)
 - #57473 (std: Render large exit codes as hex on Windows)
 - #57474 (save-analysis: Get path def from parent in case there's no def for the path itself.)
 - #57494 (Speed up item_bodies for large match statements involving regions)
 - #57496 (re-do docs for core::cmp)
 - #57508 (rustdoc: Allow inlining of reexported crates and crate items)
 - #57547 (Use `ptr::eq` where applicable)
 - #57557 (resolve: Mark extern crate items as used in more cases)
 - #57560 (hygiene: Do not treat `Self` ctor as a local variable)
 - #57564 (Update the const fn tracking issue to the new metabug)

Failed merges:

r? @ghost
@bors bors merged commit 46fa818 into rust-lang:master Jan 13, 2019
@nnethercote nnethercote deleted the ParseResult-Failure-static-str branch January 13, 2019 22:31
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.

10 participants