CityHash is a family of non-cryptographic hash functions optimized for extremely fast and high-quality hashing of strings on modern CPUs. Developed by Google, it is implemented in C++ and designed to efficiently handle both short and long inputs using techniques such as mixing operations and CPU-specific optimizations. CityHash offers multiple hash sizes—32-bit, 64-bit, 128-bit, and 256-bit variants—with the CRC-based versions leveraging hardware acceleration on CPUs that support SSE4.2 CRC32 instructions. The library emphasizes hashing performance and uniformity rather than cryptographic security, making it ideal for use in data structures like hash tables and distributed systems requiring rapid key lookups. CityHash has been rigorously tested using tools like SMHasher to ensure high-quality mixing and collision resistance across a wide range of inputs. Its speed and portability have made it a popular choice for developers needing dependable, lightweight hash functions.

Features

  • High-performance non-cryptographic hash functions for strings and binary data
  • Supports 32-bit, 64-bit, 128-bit, and 256-bit output variants
  • Optimized for little-endian 64-bit CPUs, with CRC32 acceleration on supported hardware
  • Thoroughly tested for hash quality and collision resistance using SMHasher
  • Portable C++ implementation compatible with various compilers and platforms
  • Ideal for hash tables, caching systems, and general-purpose string hashing

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow CityHash

CityHash Web Site

Other Useful Business Software
Find Hidden Risks in Windows Task Scheduler Icon
Find Hidden Risks in Windows Task Scheduler

Free diagnostic script reveals configuration issues, error patterns, and security risks. Instant HTML report.

Windows Task Scheduler might be hiding critical failures. Download the free JAMS diagnostic tool to uncover problems before they impact production—get a color-coded risk report with clear remediation steps in minutes.
Download Free Tool
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of CityHash!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C++, Unix Shell

Related Categories

Unix Shell Libraries, C++ Libraries

Registered

2025-10-11