(bytes: &[u8])
| 7 | } |
| 8 | |
| 9 | fn histogram_simple(bytes: &[u8]) -> [usize; 256] { |
| 10 | let mut histogram = [0; 256]; |
| 11 | for &v in bytes { |
| 12 | histogram[v as usize] += 1; |
| 13 | } |
| 14 | histogram |
| 15 | } |
| 16 | |
| 17 | fn histogram_parallel(bytes: &[u8]) -> [usize; 256] { |
| 18 | // Summing multiple 32 bit histograms is faster than a 64 bit histogram. |
no outgoing calls
no test coverage detected