logoalt Hacker News

__stoday at 5:10 AM0 repliesview on HN

Depends on comparison function. In clickhouse-c for type name lookup it's strcmp so I use generated hash table with no collisions & reusing cityhash function since we have it handy: https://github.com/ClickHouse/clickhouse-c/blob/4bdd89a02438...

Benchmarked an order of magnitude faster than linear scan or binary search. I agree with your general sentiment tho, which is why I measured