From 49ae0223cbdd1e6174a0d3f6f887ea7d08245717 Mon Sep 17 00:00:00 2001 From: William Bell Date: Tue, 1 Jul 2025 01:19:23 +0100 Subject: [PATCH] change gentest to be written in python for speed build faster while chloride isnt in a finished state --- Makefile | 2 +- gentest.ar | 6 ------ gentest.py | 7 +++++++ 3 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 gentest.ar create mode 100644 gentest.py diff --git a/Makefile b/Makefile index ef0339f..3fb1e58 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ full-debug: $(CFILES) $(LEXER_C) $(LEXER_H) optimised: $(CFILES) $(LEXER_C) $(LEXER_H) mkdir -p bin gcc -O3 -fprofile-generate -o $(BINARY) $(CFILES) $(CFLAGS) - ${BINARY} test.ar + ${BINARY} rand_test.ar gcc -O3 -fprofile-use -o $(BINARY) $(CFILES) $(CFLAGS) diff --git a/gentest.ar b/gentest.ar deleted file mode 100644 index 28d327c..0000000 --- a/gentest.ar +++ /dev/null @@ -1,6 +0,0 @@ -let myfile = file.write("rand_test.ar") - -for (i from 0 to 100000) do - myfile.text("\"") - myfile.text(string(random())) - myfile.text("\"\n") \ No newline at end of file diff --git a/gentest.py b/gentest.py new file mode 100644 index 0000000..0f227cb --- /dev/null +++ b/gentest.py @@ -0,0 +1,7 @@ +import random +myfile = open("rand_test.ar","w") + +for i in range(10000000): + myfile.write("\"") + myfile.write(str(random.random())[2::]) + myfile.write("\"\n")