MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / bucket_count_small

Function bucket_count_small

hail-fuzz/src/coverage.rs:304–316  ·  view source on GitHub ↗

Buckets counts such that entries that are hit a small number of times are consider interesting. EXPERIMENT: Alternative bucketing strategy to try to get coverage for individual edges to saturate earlier, (unused - block hits still appears to perform better).

(count: u8)

Source from the content-addressed store, hash-verified

302/// EXPERIMENT: Alternative bucketing strategy to try to get coverage for individual edges to
303/// saturate earlier, (unused - block hits still appears to perform better).
304const fn bucket_count_small(count: u8) -> u8 {
305 match count {
306 0 => 0b0000_0000,
307 1 => 0b0000_0001,
308 2 => 0b0000_0011,
309 3 => 0b0000_0111,
310 4 => 0b0000_1111,
311 5 => 0b0001_1111,
312 6 => 0b0011_1111,
313 7 => 0b0111_1111,
314 _ => 0b1111_1111,
315 }
316}
317
318macro_rules! gen_count_lookup_table {
319 ($name:ident, $map_count:expr) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected