<commit_before>#include <chrono>
#include <iostream>
#define N 10000
class Timer
{
public:
	Timer()
		: start_(std::chrono::high_resolution_clock::now())
	{
	}

	~Timer()
	{
		const auto finish = std::chrono::high_resolution_clock::now();
		std::cout << std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count() << " us" << std::endl;
	}

private:
	const std::chrono::high_resolution_clock::time_point start_;
};

int main() {
	int** firstMatrix = new int*[N]; //    
	int** secondMatrix = new int*[N];
	for (int i = 0; i < N; ++i) {
		firstMatrix[i] = new int[N];
		secondMatrix[i] = new int[N];
		for (int j = 0; j < N; ++j) { //     
			firstMatrix[i][j] = 1;
			secondMatrix[i][j] = 2;
		}
	}
	{
		Timer t;
		for (int i = 0; i < N; ++i) {
			for (int j = 0; j < N; ++j) {				
			    firstMatrix[j][i] += secondMatrix[j][i]; //  
			}
		}
	}
	for (int i = 0; i < N; ++i) {
		delete[] firstMatrix[i];
		delete[] secondMatrix[i];
	}<commit_msg>Update sum_by_rows.cpp<commit_after>#include <chrono>
#include <iostream>
#define N 10000
class Timer
{
public:
	Timer()
		: start_(std::chrono::high_resolution_clock::now())
	{
	}

	~Timer()
	{
		const auto finish = std::chrono::high_resolution_clock::now();
		std::cout << std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count() << " us" << std::endl;
	}

private:
	const std::chrono::high_resolution_clock::time_point start_;
};

int main() {
	int** firstMatrix = new int*[N]; //В нее же записываем рузультат
	int** secondMatrix = new int*[N];
	for (int i = 0; i < N; ++i) {
		firstMatrix[i] = new int[N];
		secondMatrix[i] = new int[N];
		for (int j = 0; j < N; ++j) { // Заполняем матрицы
			firstMatrix[i][j] = 1;
			secondMatrix[i][j] = 2;
		}
	}
	{
		Timer t;
		for (int i = 0; i < N; ++i) {
			for (int j = 0; j < N; ++j) {				
			    firstMatrix[j][i] += secondMatrix[j][i]; //суммируем по столбцам
			}
		}
	}
	for (int i = 0; i < N; ++i) {
		delete[] firstMatrix[i];
		delete[] secondMatrix[i];
	}
{'fraction_non_alphanumeric': 0.20270270270270271, 'fraction_numerical': 0.012012012012012012, 'mean_word_length': 3.584862385321101, 'pattern_counts': {'":': 0, '<': 31, '<?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': '6183158', 'n_tokens_mistral': 905, 'n_tokens_neox': 825, 'n_words': 189}