Hacker News new | ask | show | jobs
by ljouhet 1195 days ago

    pub fn phf_noshift(x: u32) -> u8 {
        (x.wrapping_mul(0x9e4c340a)%13) as u8 // Not a hash table
    }
1 comments

(I used the wrong strings: "A X" not "A X\n")

many constants work with 13 : 0x93f0687f, 0x8c38599e, 0x8f5e14c2, 0x932d2c11 some with 71 : 0xd9526a52, ... couldn't find mod 923