Skip to content

Optimize long-linker-command-line test - #65945

Merged
bors merged 1 commit into
rust-lang:masterfrom
tmiasko:long-linker-command-line
Nov 7, 2019
Merged

Optimize long-linker-command-line test#65945
bors merged 1 commit into
rust-lang:masterfrom
tmiasko:long-linker-command-line

Conversation

@tmiasko

Copy link
Copy Markdown
Contributor

Replace O(n^3) text matching with inexpensive hash set lookups.

On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.

@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2019
@nikomatsakis

Copy link
Copy Markdown
Contributor

r? @alexcrichton

I'm sure this is amazing but I honestly have no idea what is going on in this test :)

Maybe @alexcrichton does... or @Mark-Simulacrum ...

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Oct 29, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit afbb89e has been approved by alexcrichton

@borsbors 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 Oct 29, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 30, 2019
…=alexcrichton
Optimize long-linker-command-line test
Replace O(n^3) text matching with inexpensive hash set lookups.
On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.
@tmandrytmandry mentioned this pull request Oct 30, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 31, 2019
…=alexcrichton
Optimize long-linker-command-line test
Replace O(n^3) text matching with inexpensive hash set lookups.
On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.
@tmandrytmandry mentioned this pull request Oct 31, 2019
bors added a commit that referenced this pull request Oct 31, 2019
Rollup of 14 pull requests
Successful merges:
- #65112 (Add lint and tests for unnecessary parens around types)
- #65459 (Fix `-Zunpretty=mir-cfg` to render multiple items)
- #65471 (Add long error explanation for E0578)
- #65857 (rustdoc: Resolve module-level doc references more locally)
- #65914 (Use structured suggestion for unnecessary bounds in type aliases)
- #65945 (Optimize long-linker-command-line test)
- #65946 (Make `promote_consts` emit the errors when required promotion fails)
- #65960 (doc: reword iter module example and mention other methods)
- #65963 (update submodules to rust-lang)
- #65972 (Fix libunwind build: Define __LITTLE_ENDIAN__ for LE targets)
- #65977 (Fix incorrect diagnostics for expected type in E0271 with an associated type)
- #65995 (Add error code E0743 for "C-variadic has been used on a non-foreign function")
- #65997 (Fix outdated rustdoc of Once::init_locking function)
- #66005 (vxWorks: remove code related unix socket)
Failed merges:
r? @ghost
Replace O(n^3) text matching with inexpensive hash set lookups.
On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.
@tmiasko
tmiaskoforce-pushed the long-linker-command-line branch from afbb89e to 6bbe162CompareNovember 1, 2019 09:00
@tmandry

Copy link
Copy Markdown
Member

Failed in #66009 (comment), @bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 1, 2019
@tmiasko

Copy link
Copy Markdown
ContributorAuthor

Previous version didn't take into account that @file on msvc contains arguments
wrapped in quotes.

Used artificial separators for splitting library names to reduce the amount of
platform specific behaviour that has to be taken into account.

r? @alexcrichton

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Nov 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 6bbe162 has been approved by alexcrichton

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 4, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 6, 2019
…=alexcrichton
Optimize long-linker-command-line test
Replace O(n^3) text matching with inexpensive hash set lookups.
On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.
@JohnTitorJohnTitor mentioned this pull request Nov 6, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 7, 2019
…=alexcrichton
Optimize long-linker-command-line test
Replace O(n^3) text matching with inexpensive hash set lookups.
On my machine this reduces the total runtime of complete
run-make-fulldeps suite from roughly 75 seconds to 45 seconds.
@JohnTitorJohnTitor mentioned this pull request Nov 7, 2019
bors added a commit that referenced this pull request Nov 7, 2019
Rollup of 12 pull requests
Successful merges:
- #65794 (gate rustc_on_unimplemented under rustc_attrs)
- #65945 (Optimize long-linker-command-line test)
- #66044 (Improve uninit/zeroed lint)
- #66076 (HIR docs: mention how to resolve method paths)
- #66084 (Do not require extra LLVM backends for `x.py test` to pass)
- #66111 (improve from_raw_parts docs)
- #66114 (Improve std::thread::Result documentation)
- #66117 (Fixed PhantomData markers in Arc and Rc)
- #66146 (Remove unused parameters in `__thread_local_inner`)
- #66147 (Miri: Refactor to_scalar_ptr out of existence)
- #66162 (Fix broken link in README)
- #66171 (Update link on CONTRIBUTING.md)
Failed merges:
r? @ghost
@bors
bors merged commit 6bbe162 into rust-lang:masterNov 7, 2019
let contents = fs::read(path).unwrap();
if cfg!(target_env = "msvc") {
let mut i = contents.chunks(2).map(|c| {
c[0] as u16 | ((c[1] as u16) << 8)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be u16::from_le_bytes

@tmiasko
tmiasko deleted the long-linker-command-line branch February 27, 2020 21:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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.

7 participants

@tmiasko@rust-highfive@nikomatsakis@alexcrichton@bors@tmandry@tesuji