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

Rollup of 9 pull requests #41872

Closed
wants to merge 27 commits into from
Closed

Rollup of 9 pull requests #41872

wants to merge 27 commits into from

Conversation

scottmcm and others added 27 commits May 4, 2017 20:28
Since LLVM doesn't vectorize the loop for us, do unaligned reads
of a larger type and use LLVM's bswap intrinsic to do the
reversing of the actual bytes.  cfg!-restricted to x86 and
x86_64, as I assume it wouldn't help on things like ARMv5.

Also makes [u16]::reverse() a more modest 1.5x faster by
loading/storing u32 and swapping the u16s with ROT16.

Thank you ptr::*_unaligned for making this easy :)
- Adds an explanantion of what `park` does in the `unpark` documentation.
- Adds a link to the module doc.
Part of rust-lang#29378

- Moves the module documentation into `park`.
- Add the same example as the one from `unpark` to `park`.
The best way to do this wasn't in the documentation, and the ways that
were there needed some extra text to elaborate.

Fixes rust-lang#40159
This is something I always forget, so let's actually
explain in the docs.
When `RUST_BACKTRACE=1`, remove all frames after
`__rust_maybe_catch_panic`. Tested on `main`, threads, tests and
benches. Cleaning of the top of the stacktrace is let to a future PR.

Fixes rust-lang#40201

See rust-lang#41815
Add more ways to create a PathBuf to docs

The best way to do this wasn't in the documentation, and the ways that
were there needed some extra text to elaborate.

Fixes rust-lang#40159

/cc @nagisa
…ushi

Improve docs on Arc<T> and Send/Sync

This is something I always forget, so let's actually
explain in the docs.

I didn't fully link up everything here, but I'd like to make sure that the wording is okay before I bother.
Make [u8]::reverse() 5x faster

Since LLVM doesn't vectorize the loop for us, do unaligned reads of a larger type and use LLVM's bswap intrinsic to do the reversing of the actual bytes.  cfg!-restricted to x86 and x86_64, as I assume it wouldn't help on things like ARMv5.

Also makes [u16]::reverse() a more modest 1.5x faster by loading/storing u32 and swapping the u16s with ROT16.

Thank you ptr::*_unaligned for making this easy :)

Benchmark results (from my i5-2500K):
```text
test slice::reverse_u8      ... bench:  273,836 ns/iter (+/- 15,592) =  3829 MB/s
test slice::reverse_u16     ... bench:  139,793 ns/iter (+/- 17,748) =  7500 MB/s
test slice::reverse_u32     ... bench:   74,997 ns/iter  (+/- 5,130) = 13981 MB/s
test slice::reverse_u64     ... bench:   47,452 ns/iter  (+/- 2,213) = 22097 MB/s

test slice::reverse_u8      ... bench:   52,170 ns/iter (+/- 3,962) = 20099 MB/s
test slice::reverse_u16     ... bench:   93,330 ns/iter (+/- 4,412) = 11235 MB/s
test slice::reverse_u32     ... bench:   74,731 ns/iter (+/- 1,425) = 14031 MB/s
test slice::reverse_u64     ... bench:   47,556 ns/iter (+/- 3,025) = 22049 MB/s
```

If you're curious about the assembly, instead of doing this
```
movzx	eax, byte ptr [rdi]
movzx	ecx, byte ptr [rsi]
mov	byte ptr [rdi], cl
mov	byte ptr [rsi], al
```
it does this
```
mov	rax, qword ptr [rdx]
mov	rbx, qword ptr [r11 + rcx - 8]
bswap	rbx
mov	qword ptr [rdx], rbx
bswap	rax
mov	qword ptr [r11 + rcx - 8], rax
```
[DOC] Improve the thread::park and thread::unpark documentation

Part of rust-lang#29378 .

Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example.

- `park should` have its module documentation inlined here, and cleaned up.
- `park_timeout` could use links to `park`.
…r=alexcrichton

Improve cleaning of the bottom of the backtrace

Following rust-lang#40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads.

I kept `skipped_before` since it will be used later for the cleaning of the top.
…ichton

Update jemalloc to 4.5.0

* pointing jemalloc submodule to the 4.5.0 HEAD + generated configure script
* removed the now unnecessary extra config for windows. jemalloc is now much better at configuring itself overall.

Let's see what the CI think.
…alexcrichton

ci: Update android ndk and sdk

Make install-sdk.sh and install-ndk.sh more generic so future updates can be made directly on Dockerfile. Update ndk to r13b, which will be necessary to make host builds for android (in the future). Update sdk to r25.2.5 (maybe some emulator performance improvement).
…hton

Add disabled android host builders

Introduce the concept of disabled builder. A disabled builder is one that is not run by travis. It is intended to be run by the user who wants a rustc for a tier 2 or 3 platform. Off corse, there is no guarantee that it will work.
@frewsxcv
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented May 10, 2017

📌 Commit 57a593f has been approved by frewsxcv

@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.

@bors
Copy link
Contributor

bors commented May 10, 2017

⌛ Testing commit 57a593f with merge 97ab5eb...

@bors
Copy link
Contributor

bors commented May 10, 2017

💔 Test failed - status-travis

@TimNN TimNN mentioned this pull request May 10, 2017
@frewsxcv frewsxcv closed this May 10, 2017
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.