Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
net_instaweb::CasePreserve Struct Reference

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)

Detailed Description

A helper for case-sensitive hashing.

Member Function Documentation

static unsigned char net_instaweb::CasePreserve::Normalize ( char  c)

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.

The documentation for this struct was generated from the following file: