This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
const KEY_KIND_STRING = 1; | |
const KEY_KIND_NUMBER = 2; | |
const KEY_KIND_BOOL = 3; | |
const KEY_KIND_RECORD = 4; | |
type KeyKind = 1 | 2 | 3 | 4; | |
class KeyValue<K, V> { | |
key: ?K; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <strings.h> | |
/* | |
* Pearson hashing (from Wikipedia) | |
* | |
* Pearson hashing is a hash function designed for fast execution on processors with 8-bit registers. | |
* Given an input consisting of any number of bytes, it produces as output a single byte that is strongly | |
* dependent on every byte of the input. Its implementation requires only a few instructions, plus a |