-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
shootout-fannkuch-redux rewrite #13633
Conversation
for i in range(1, n) { | ||
let perm = perm.as_mut_slice(); | ||
let count = count.as_mut_slice(); | ||
unsafe { |
There was a problem hiding this comment.
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?
@alexcrichton if you have an idea of how to do that, I'm interrested. |
} else { | ||
*count.unsafe_mut_ref(i) += 1; | ||
break; | ||
} |
There was a problem hiding this comment.
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.
@alexcrichton safe indice version amended. |
…r=alexcrichton Less bound checking and parallelisation. Brute speed improvement is about 15% faster. The unsafe block improve the brute speed by about 5%.
…ykril feat: Allow viewing the full compiler diagnostic in a readonly textview  Also adds a VSCode only config that replaces the split diagnostic message with the first relevant part of the diagnostic output  This only affects diagnostics generated by primary spans and has no effect on other clients than VSCode. Fixes rust-lang/rust-analyzer#13574
…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`
Less bound checking and parallelisation. Brute speed improvement
is about 15% faster.
The unsafe block improve the brute speed by about 5%.