MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / histogram

Function histogram

src/histogram.rs:1–7  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

1pub fn histogram(bytes: &[u8]) -> [usize; 256] {
2 if bytes.len() < 100 {
3 histogram_simple(bytes)
4 } else {
5 histogram_parallel(bytes)
6 }
7}
8
9fn histogram_simple(bytes: &[u8]) -> [usize; 256] {
10 let mut histogram = [0; 256];

Callers 3

unpack_bytes_less_thanFunction · 0.85
populateMethod · 0.85

Calls 3

histogram_simpleFunction · 0.85
histogram_parallelFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected