This is a hasher, a fuzzer, and genetic algorithm. This tool generates formulas (in JS code) to map a given set of inputs (numbers) to a perfect minimal lookup table.
For example, the values `10, 20, 30, 40
` map to a perfect hash with the mapper formula `n => n / 10 - 1
` to `{0: 10, 1: 20, 2: 30, 3: 40}
`. You can validate the result with this tool here. There is another example page, I think it's older?
By Peter van der Zee, © pvdz.ee, July 2016. See github.com/pvdz/gasher for code/readme and pvdz.ee/weblog/376 for blog post.