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

Optimize long-linker-command-line test #65945

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Oct 29, 2019

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
Collaborator

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-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2019
@nikomatsakis
Copy link
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
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 29, 2019

📌 Commit afbb89e has been approved by alexcrichton

@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 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.
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.
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.
@tmandry
Copy link
Member

tmandry commented Nov 1, 2019

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

@bors bors 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
Contributor Author

tmiasko commented Nov 4, 2019

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
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 4, 2019

📌 Commit 6bbe162 has been approved by alexcrichton

@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-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.
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.
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:master Nov 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
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 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.

7 participants