Merge from Monty
[m6w6/libmemcached] / tests / hash_results.h
1 /*
2 * Copyright (C) 2006-2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 */
8
9 /**
10 @brief We list strings and results for testing different hashing algo in
11 this file.
12 */
13
14
15 static const char *list_to_hash[]=
16 {
17 "apple",
18 "beat",
19 "carrot",
20 "daikon",
21 "eggplant",
22 "flower",
23 "green",
24 "hide",
25 "ick",
26 "jack",
27 "kick",
28 "lime",
29 "mushrooms",
30 "nectarine",
31 "orange",
32 "peach",
33 "quant",
34 "ripen",
35 "strawberry",
36 "tang",
37 "up",
38 "volumne",
39 "when",
40 "yellow",
41 "zip",
42 NULL
43 };
44
45 static uint32_t md5_values[]= { 3195025439U, 2556848621U, 3724893440U, 3332385401U,
46 245758794U, 2550894432U, 121710495U, 3053817768U,
47 1250994555U, 1862072655U, 2631955953U, 2951528551U,
48 1451250070U, 2820856945U, 2060845566U, 3646985608U,
49 2138080750U, 217675895U, 2230934345U, 1234361223U,
50 3968582726U, 2455685270U, 1293568479U, 199067604U,
51 2042482093U };
52
53 static uint32_t crc_values[]= { 10542U, 22009U, 14526U, 19510U, 19432U, 10199U, 20634U,
54 9369U, 11511U, 10362U, 7893U, 31289U, 11313U, 9354U,
55 7621U, 30628U, 15218U, 25967U, 2695U, 9380U,
56 17300U, 28156U, 9192U, 20484U, 16925U };
57
58 static uint32_t fnv1_64_values[]= { 473199127U, 4148981457U, 3971873300U, 3257986707U,
59 1722477987U, 2991193800U, 4147007314U, 3633179701U,
60 1805162104U, 3503289120U, 3395702895U, 3325073042U,
61 2345265314U, 3340346032U, 2722964135U, 1173398992U,
62 2815549194U, 2562818319U, 224996066U, 2680194749U,
63 3035305390U, 246890365U, 2395624193U, 4145193337U,
64 1801941682U };
65
66 static uint32_t fnv1a_64_values[]= { 1488911807U, 2500855813U, 1510099634U, 1390325195U,
67 3647689787U, 3241528582U, 1669328060U, 2604311949U,
68 734810122U, 1516407546U, 560948863U, 1767346780U,
69 561034892U, 4156330026U, 3716417003U, 3475297030U,
70 1518272172U, 227211583U, 3938128828U, 126112909U,
71 3043416448U, 3131561933U, 1328739897U, 2455664041U,
72 2272238452U };
73
74 static uint32_t fnv1_32_values[]= { 67176023U, 1190179409U, 2043204404U, 3221866419U,
75 2567703427U, 3787535528U, 4147287986U, 3500475733U,
76 344481048U, 3865235296U, 2181839183U, 119581266U,
77 510234242U, 4248244304U, 1362796839U, 103389328U,
78 1449620010U, 182962511U, 3554262370U, 3206747549U,
79 1551306158U, 4127558461U, 1889140833U, 2774173721U,
80 1180552018U };
81
82 static uint32_t fnv1a_32_values[]= { 280767167U, 2421315013U, 3072375666U, 855001899U,
83 459261019U, 3521085446U, 18738364U, 1625305005U,
84 2162232970U, 777243802U, 3323728671U, 132336572U,
85 3654473228U, 260679466U, 1169454059U, 2698319462U,
86 1062177260U, 235516991U, 2218399068U, 405302637U,
87 1128467232U, 3579622413U, 2138539289U, 96429129U,
88 2877453236U };
89
90 #ifdef HAVE_HSIEH_HASH
91 static uint32_t hsieh_values[]= { 3738850110U, 3636226060U, 3821074029U, 3489929160U, 3485772682U, 80540287U,
92 1805464076U, 1895033657U, 409795758U, 979934958U, 3634096985U, 1284445480U,
93 2265380744U, 707972988U, 353823508U, 1549198350U, 1327930172U, 9304163U,
94 4220749037U, 2493964934U, 2777873870U, 2057831732U, 1510213931U, 2027828987U,
95 3395453351U };
96 #else
97 static uint32_t hsieh_values[]= { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
98 #endif
99
100 static uint32_t murmur_values[]= { 4142305122U, 734504955U, 3802834688U, 4076891445U,
101 387802650U, 560515427U, 3274673488U, 3150339524U,
102 1527441970U, 2728642900U, 3613992239U, 2938419259U,
103 2321988328U, 1145154116U, 4038540960U, 2224541613U,
104 264013145U, 3995512858U, 2400956718U, 2346666219U,
105 926327338U, 442757446U, 1770805201U, 560483147U,
106 3902279934U };
107
108 static uint32_t jenkins_values[]= { 1442444624U, 4253821186U, 1885058256U, 2120131735U,
109 3261968576U, 3515188778U, 4232909173U, 4288625128U,
110 1812047395U, 3689182164U, 2502979932U, 1214050606U,
111 2415988847U, 1494268927U, 1025545760U, 3920481083U,
112 4153263658U, 3824871822U, 3072759809U, 798622255U,
113 3065432577U, 1453328165U, 2691550971U, 3408888387U,
114 2629893356U };
115