Browse Source

updated algoiithm and larger primes

master
madscientist 4 years ago
parent
commit
03aab748cd
2 changed files with 36 additions and 37 deletions
  1. 2
    3
      mishmash.cpp
  2. 34
    34
      mishmash.hpp

+ 2
- 3
mishmash.cpp View File

@@ -16,10 +16,9 @@ uint64_t masher::engine(
const masher::PrimeSet& primes) noexcept {
for(size_t index = 0; index < length; index++) {
unsigned char byte = buffer[index];
accumulator += primes.select(byte + accumulator);
accumulator *= primes.select(accumulator);
accumulator += primes.select(accumulator) + byte;
accumulator *= primes.select(byte);
accumulator += accumulator >> 32;
accumulator &= 0x000fffffffffffff;
}
return accumulator;
}

+ 34
- 34
mishmash.hpp View File

@@ -19,41 +19,41 @@ namespace masher {
};

const PrimeSet Primes {
1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061,
1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109,
1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181,
1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231,
1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291,
1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361,
1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429,
1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481,
1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531,
1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583,
1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627,
1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699,
1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759,
1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831,
1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889,
1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973,
1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017,
2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083,
2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137,
2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213,
2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273,
2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339,
2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383,
2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441,
4294961843, 4294961861, 4294961863, 4294961873, 4294961893, 4294961897, 4294961921, 4294961927,
4294961941, 4294961959, 4294961963, 4294962019, 4294962047, 4294962079, 4294962137, 4294962151,
4294962211, 4294962223, 4294962233, 4294962271, 4294962277, 4294962299, 4294962313, 4294962341,
4294962349, 4294962367, 4294962377, 4294962389, 4294962391, 4294962401, 4294962409, 4294962449,
4294962473, 4294962499, 4294962533, 4294962541, 4294962589, 4294962619, 4294962629, 4294962641,
4294962653, 4294962689, 4294962691, 4294962703, 4294962719, 4294962731, 4294962751, 4294962757,
4294962779, 4294962809, 4294962817, 4294962827, 4294962853, 4294962887, 4294962899, 4294962911,
4294962929, 4294962953, 4294963039, 4294963051, 4294963093, 4294963097, 4294963111, 4294963117,
4294963171, 4294963237, 4294963291, 4294963313, 4294963333, 4294963349, 4294963369, 4294963427,
4294963429, 4294963459, 4294963499, 4294963523, 4294963537, 4294963553, 4294963571, 4294963583,
4294963619, 4294963637, 4294963639, 4294963643, 4294963667, 4294963681, 4294963723, 4294963747,
4294963781, 4294963787, 4294963847, 4294963853, 4294963891, 4294963901, 4294963921, 4294963943,
4294963957, 4294963987, 4294963993, 4294964017, 4294964027, 4294964029, 4294964039, 4294964081,
4294964123, 4294964131, 4294964159, 4294964173, 4294964203, 4294964207, 4294964209, 4294964213,
4294964221, 4294964239, 4294964249, 4294964257, 4294964263, 4294964281, 4294964287, 4294964309,
4294964327, 4294964341, 4294964381, 4294964419, 4294964437, 4294964441, 4294964461, 4294964489,
4294964491, 4294964521, 4294964537, 4294964543, 4294964561, 4294964579, 4294964599, 4294964621,
4294964633, 4294964683, 4294964689, 4294964749, 4294964771, 4294964789, 4294964809, 4294964827,
4294964833, 4294964879, 4294964887, 4294964893, 4294964897, 4294964899, 4294964903, 4294964923,
4294964929, 4294964939, 4294964959, 4294964969, 4294964977, 4294964981, 4294965019, 4294965131,
4294965137, 4294965151, 4294965161, 4294965193, 4294965203, 4294965229, 4294965251, 4294965263,
4294965307, 4294965313, 4294965331, 4294965347, 4294965361, 4294965383, 4294965413, 4294965457,
4294965461, 4294965487, 4294965529, 4294965581, 4294965601, 4294965613, 4294965617, 4294965641,
4294965659, 4294965671, 4294965673, 4294965679, 4294965683, 4294965691, 4294965721, 4294965733,
2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531,
2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593,
2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663,
2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707,
2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753,
2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819,
2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887,
2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957
4294965737, 4294965757, 4294965767, 4294965793, 4294965821, 4294965839, 4294965841, 4294965847,
4294965887, 4294965911, 4294965937, 4294965949, 4294965967, 4294965971, 4294965977, 4294966001,
4294966007, 4294966043, 4294966073, 4294966087, 4294966099, 4294966121, 4294966129, 4294966153,
4294966163, 4294966177, 4294966187, 4294966217, 4294966231, 4294966237, 4294966243, 4294966297,
4294966337, 4294966367, 4294966373, 4294966427, 4294966441, 4294966447, 4294966477, 4294966553,
4294966583, 4294966591, 4294966619, 4294966639, 4294966651, 4294966657, 4294966661, 4294966667,
4294966769, 4294966813, 4294966829, 4294966877, 4294966909, 4294966927, 4294966943, 4294966981,
4294966997, 4294967029, 4294967087, 4294967111, 4294967143, 4294967161, 4294967189, 4294967197
};
uint64_t engine(

Loading…
Cancel
Save