<commit_before>// Copyright (c) 2015 Flowgrammable.org
// All rights reserved

#ifndef LIBMATCH_HASH_HPP
#define LIBMATCH_HASH_HPP

// The hashing module...
//
// TODO: Actually document the hash table.

#include <vector>


namespace hash_table
{

constexpr long table_sizes[] = {
  29, 53, 97, 193, 389, 769, 1543, 3079,
  6151, 12289, 24593, 49157, 98317, 196613,
  393241, 786433, 1572869, 3145739, 6191469,
  12582917, 25165843, 50331653, 100663319,
  201326611, 402653189, 805306457, 1610612741
}

namespace data_store
{

// A simple key-value pair
template<typename K, typename V>
struct entry
{
  entry()
    : key(K()),val(V())
  { }
  
  entry(K const& k, V const& v)
    : key(k),val(v)
  { }
<commit_msg>Replace table sizes with formatted primes table.<commit_after>// Copyright (c) 2015 Flowgrammable.org
// All rights reserved

#ifndef LIBMATCH_HASH_HPP
#define LIBMATCH_HASH_HPP

// The hashing module...
//
// TODO: Actually document the hash table.

#include <vector>


namespace hash_table
{

static size_t const primes[] = {
          53,        97,       193,       389,       769,
        1543,      3079,      6151,     12289,     24593, 
       49157,     98317,    196613,    393241,    786433, 
     1572869,   3145739,   6291469,  12582917,  25165843,
    50331653, 100663319, 201326611, 402653189, 805306457,
  1610612741,
};
static size_t const nprimes = sizeof(primes) / sizeof(size_t);


namespace data_store
{

// A simple key-value pair
template<typename K, typename V>
struct entry
{
  entry()
    : key(K()),val(V())
  { }
  
  entry(K const& k, V const& v)
    : key(k),val(v)
  { }

{'fraction_non_alphanumeric': 0.12059369202226346, 'fraction_numerical': 0.19666048237476808, 'mean_word_length': 3.004950495049505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6465188', 'n_tokens_mistral': 838, 'n_tokens_neox': 611, 'n_words': 164}