Daily Shaarli

All links of one day in a single page.

March 13, 2023

The World's Smallest Hash Table | orlp.net

This is a not-so-short article teeming with "Aha!" moments.

  1. reduce all branching in the solution to a math expression
  2. converted to a lookup algorithm
  3. we need a perfect hash function
  4. use multiplication + shr as bit mixer
  5. store answers directly in a single u32 integer
  6. cram the answers even tighter with overlaps

The post shows off lot of tricks, very interesting read.