<commit_before>#include "../euler_util.h"

#include <vector>
#include <numeric>
#include <iostream>


int sum(int total, int element)
{
    return total + element;
}

int main(int argc, char *argv[])
{
    float start = timeit();

    long squares_sum = 0;
    std::vector<int> sum_square;

    for (int i=1; i <= 100; i++) {
        squares_sum += i * i;
        sum_square.push_back(i);
    }

    long sum_total = pow(std::accumulate(sum_square.begin(), 
                                         sum_square.end(), 0, sum), 2);
    long answer = sum_total - squares_sum;

    float stop = timeit();

    std::cout << "Answer: " << answer << std::endl;

    std::cout.precision(5);<commit_msg>Rm unnecessary functions (e.g. accumulate) speed cut in half<commit_after>#include "../euler_util.h"

#include <vector>
#include <iostream>


int main(int argc, char *argv[])
{
    float start = timeit();

    long squares_sum = 0;
    long sum_square = 0;

    for (int i=1; i <= 100; i++) {
        squares_sum += i * i;
        sum_square += i;
    }

    long sum_total = pow(sum_square, 2);
    long answer = sum_total - squares_sum;

    float stop = timeit();

    std::cout << "Answer: " << answer << std::endl;

    std::cout.precision(5);
{'fraction_non_alphanumeric': 0.15539452495974235, 'fraction_numerical': 0.01288244766505636, 'mean_word_length': 2.623906705539359, 'pattern_counts': {'":': 0, '<': 23, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5299688', 'n_tokens_mistral': 451, 'n_tokens_neox': 413, 'n_words': 112}