News for hackers. Stuff that matters.
Re:Modern Minimal Perfect Hashing: A Survey by duskwuff on Wednesday June 11, 2025 @02:10AM (#44244661)
This set of symbols has some interesting properties which allow for this solution:

    func symbolHash(c byte) byte {
        x := (c - 1) >> 5
        y := int(c) + 0x1b150000>>(x<<3)
        return byte(y & 31)
    }
But this doesn't generalize - it depends on the input consisting of a couple runs of consecutive characters which can be made continuous. (Extra credit: why is "c-1" necessary?)

There are no comments on this comment yet.