Skip to content

shootout-fannkuch-redux rewrite #13633

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

Merged
merged 1 commit into from
Apr 20, 2014

Conversation

TeXitoi
Copy link
Contributor

@TeXitoi TeXitoi commented Apr 19, 2014

Less bound checking and parallelisation. Brute speed improvement
is about 15% faster.

The unsafe block improve the brute speed by about 5%.

for i in range(1, n) {
let perm = perm.as_mut_slice();
let count = count.as_mut_slice();
unsafe {
Copy link
Member

Choose a reason for hiding this comment

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

It would be a bit sad if we can only show off how fast rust is with the usage of unsafe code, can this be rewritten to use iterators to eliminate bounds checking?

@TeXitoi
Copy link
Contributor Author

TeXitoi commented Apr 20, 2014

@alexcrichton if you have an idea of how to do that, I'm interrested.

} else {
*count.unsafe_mut_ref(i) += 1;
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

This should be able to get replaced with:

for (i, count_slot) in count.mut_iter().enumerate() {
    ...
}

Less bound checking and parallelisation.  Brute speed improvement
is about 15% faster.
@TeXitoi
Copy link
Contributor Author

TeXitoi commented Apr 20, 2014

@alexcrichton safe indice version amended.

bors added a commit that referenced this pull request Apr 20, 2014
…r=alexcrichton

Less bound checking and parallelisation.  Brute speed improvement
is about 15% faster.

The unsafe block improve the brute speed by about 5%.
@bors bors closed this Apr 20, 2014
@bors bors merged commit 57d6934 into rust-lang:master Apr 20, 2014
@TeXitoi TeXitoi deleted the shootout-fannkuch-redux-rewrite branch April 21, 2014 12:06
Manishearth pushed a commit to Manishearth/rust that referenced this pull request Nov 23, 2022
…ykril

feat: Allow viewing the full compiler diagnostic in a readonly textview

![Code_y1qrash9gg](https://user-images.githubusercontent.com/3757771/202780459-f751f65d-2b1b-4dc3-9685-100d65ebf6a0.gif)

Also adds a VSCode only config that replaces the split diagnostic message with the first relevant part of the diagnostic output

![Code_7k4qsMkx5e](https://user-images.githubusercontent.com/3757771/202780346-cf9137d9-eb77-46b7-aed6-c73a2e41e1c7.png)

This only affects diagnostics generated by primary spans and has no effect on other clients than VSCode.

Fixes rust-lang/rust-analyzer#13574
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 7, 2024
…coap, r=Centri3

Add 'CoAP' to doc-valid-idents

CoAP is a name of a network protocol common in embedded systems; one would talk in documentation about "a CoAP server" or "a CoAP client" without referring to a specific type.

This PR fixes false positives that arise from that use.

changelog: [`doc_markdown`]: Add CoAP to `doc-valid-idents`.

As this review is identical in structure to rust-lang/rust-clippy#13460, I'm asking for a the same reviewer (if that works):

r? `@Centri3`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants