Uh oh!
There was an error while loading. Please reload this page.
rewrite of shootout-fasta.rs - #10933
Conversation
emberian
commented
Dec 12, 2013
Please change |
There was a problem hiding this comment.
I think you can write this function as:
letmut cum = 0.0;let data = aa.iter().map(|&(ch, p)| { cum += p;(cum, ch asu8)}).collect();AAGen{rng: rng,data: data }(with line breaking to taste.)
TeXitoi
commented
Dec 12, 2013
With all the comment and using integer arithmetic for a big speedup (should be about as fast as the best official implementation). |
There was a problem hiding this comment.
Why can't this just be LINE_LENGTH + 1?
TeXitoi
commented
Dec 12, 2013
The previous commit does not include the integer arithmetic, this one is better. If we want safe code, we can remove it at the cost of 5% here. |
TeXitoi
commented
Dec 12, 2013
Finally, |
TeXitoi
commented
Dec 12, 2013
@huonw version discussed in the outdated diff is basically |
huonw
commented
Dec 12, 2013
(cc @alexcrichton ^, since, iirc, one doesn't get notifications from the main PR after commenting on an individual commit.) |
alexcrichton
commented
Dec 12, 2013
huh, who knew! |
…chton improvements: - no managed box - no virtual calls - no useless copy - optimizations (bisect is slower, limit tests, BufferedWriter...) - pass shootout test - 10 times faster
[`useless_vec`]: lint on `vec![_]` invocations that adjust to a slice Fixesrust-lang#2262 (well, actually my PR over at rust-lang#10901 did do most of the stuff, but this PR implements the one last other case mentioned in the comments that my PR didn't fix) Before this change, it would lint `(&vec![1]).iter().sum::<i32>()`, but not `vec![1].iter().sum::<i32>()`. This PR handles this case. This also refactors a few things that I wanted to do in my other PR but forgot about. changelog: [`useless_vec`]: lint on `vec![_]` invocations that adjust to a slice
10933: show values of constants in hover r=lnicola a=HKalbasi Fixrust-lang#8497 cc rust-lang#8655 Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
improvements: