<commit_before>#include "hashnode.h"
#include "hashutils.h"

bool inList(Entity* e, std::vector<Entity*>& list)
{
    for (auto& entity : list)
        if (entity->getId() == e->getId())
            return true;

    return false;
}

HashNode::HashNode(int32 x, int32 y) :
    m_x(x),
    m_y(y),
    m_hash(hash(x, y))
{
    m_bounds.x = x * cell_size;
    m_bounds.y = y * cell_size;
    m_bounds.width = cell_size;
    m_bounds.height = cell_size;<commit_msg>Now reserving 10 entities in the hash node to help improve preformance.<commit_after>#include "hashnode.h"
#include "hashutils.h"

bool inList(Entity* e, std::vector<Entity*>& list)
{
    for (auto& entity : list)
        if (entity->getId() == e->getId())
            return true;

    return false;
}

HashNode::HashNode(int32 x, int32 y) :
    m_x(x),
    m_y(y),
    m_hash(hash(x, y))
{
    m_bounds.x = x * cell_size;
    m_bounds.y = y * cell_size;
    m_bounds.width = cell_size;
    m_bounds.height = cell_size;

    m_entities.reserve(10);
{'fraction_non_alphanumeric': 0.1493570722057369, 'fraction_numerical': 0.011869436201780416, 'mean_word_length': 3.015873015873016, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7236460', 'n_tokens_mistral': 395, 'n_tokens_neox': 388, 'n_words': 87}