Hacker News new | past | comments | ask | show | jobs | submit login

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



(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




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: