<commit_before>#include <luwra.hpp>
#include <iostream>
#include <string>

using namespace luwra;

struct A {
	void f() {
		std::cout << "Hello World" << std::endl;
	}
};

struct B: A {};

int main() {
	StateWrapper state;
	state.loadStandardLibrary();

	registerUserType<A()>(state, "A", {LUWRA_MEMBER(A, f)});
	registerUserType<B()>(state, "B", {LUWRA_MEMBER(B, f)});

	if (state.runString("B():f()") != LUA_OK)
		std::cerr << read<std::string>(state, -1) << std::endl;

	return 0;
}
<commit_msg>Save profiling example<commit_after>#include <luwra.hpp>
#include <iostream>
#include <list>

int main() {
	luwra::StateWrapper state;

	if (state.runString("foo = function (s) return s .. s; end") != LUA_OK) {
		std::cerr << luwra::read<std::string>(state, -1) << std::endl;
		return 1;
	}

	luwra::NativeFunction<std::string> foo = state["foo"];
	std::string input = "Hello World";
	std::string expected_output = input + input;

	for (size_t i = 0; i < 50000000; i++) {
		std::string result = foo(input);

		if (result != expected_output) {
			std::cerr << "Error" << std::endl;
			return 1;
		}
	}

	return 0;
}

{'fraction_non_alphanumeric': 0.20125786163522014, 'fraction_numerical': 0.013477088948787063, 'mean_word_length': 4.712820512820513, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '6054872', 'n_tokens_mistral': 466, 'n_tokens_neox': 431, 'n_words': 100}