Page Speed Optimization Libraries
1.13.35.1
|
A helper for case-sensitive hashing. More...
#include "string_hash.h"
Static Public Member Functions | |
static unsigned char | Normalize (char c) |
static bool | Compare (const StringPiece &a, const StringPiece &b) |
A helper for case-sensitive hashing.
|
inlinestatic |
We want to use unsigned characters for the return value of Normalize here and in CaseFold::Normalize. This is so that we get the same hash-value arithmetic regardless of whether the c++ compiler treats chars as signed or unsigned by default. We want to get the same hash-values independent of machine so that we get consistent domain sharding and therefore better caching behavior in a multi-server setup that contains heterogeneous machines.