gperf
« Back to VersTracker
Description:
Perfect hash function generator
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: hashing compiler performance c generator
Install: brew install gperf
About:
GNU gperf is a command-line utility that generates perfect hash functions from a list of key words. It is commonly used in C and C++ programs to create highly efficient lookup tables for compilers and interpreters. This tool significantly optimizes keyword recognition by eliminating hash collisions.
Key Features:
  • Generates C, C++, or Java code for perfect hash functions
  • Handles large key sets with minimal collisions
  • Flexible keyword and identifier input formats
  • Integrates easily with C/C++ build systems
Use Cases:
  • Optimizing keyword lookup in compilers and interpreters
  • Creating efficient symbol tables for parsers
  • Improving performance of command dispatch mechanisms
Alternatives:
  • cmph – C Minimal Perfect Hashing Library; supports more algorithms but is a larger dependency
  • Perfect Hash (Rust crate) – Modern Rust implementation; better suited for Rust projects than C/C++ legacy codebases
Version History
Detected Version Rev Change Commit
Sep 10, 2025 9:07am 0 VERSION_BUMP ae7409ac