Hacker News new | ask | show | jobs
by rurban 277 days ago
See, your academic defense lacks any practicalism. I know how academics define it, that's why you barely cannot them use as is.

With some algos you can export the ordering tables trivially, but nobody does. Because someone else's problem.

1 comments

What exactly would be “practical” about exporting an ordering table when your application doesn’t need it? That’s the whole point of minimal perfect hashing — to provide a compact, collision-free mapping from a known key set to [1..n], without extra structures unless they’re required.

If you do need to preserve key order, that’s a different problem entirely — and one that’s already well-studied. You’d use an order-preserving MPHF (OMPHF), not a standard MPHF. There’s a large body of literature on this (e.g. “Order Preserving Minimal Perfect Hashing” – VTechWorks, ).

You seem to conflate the two problems — building an efficient MPHF versus building an OMPHF. Both are useful, but for different goals. Dismissing something as “academic” because it solves a different problem efficiently isn’t a fair critique — it’s misunderstanding what it’s optimizing for. It’s like saying “Bloom filters aren’t practical because they don’t store the original data.”