Benchmarks are working, but empty

Lots of work and stress for a tint bit of progress.

See #131
This commit is contained in:
2024-10-19 15:57:07 +11:00
parent 787a1cca84
commit 5d37d06343
10 changed files with 159 additions and 1 deletions

26
tests/benchmarks/array.c Normal file
View File

@@ -0,0 +1,26 @@
#include "toy_array.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
// for (int i = 0; i < argc; i++) {
// printf("argv[%d]: %s\n", i, argv[i]);
// }
// if (iargc != 2) return -1;
unsigned int iterations = atoi(argv[1]);
// printf("Found %d iterations\n", iterations);
Toy_Array* array = TOY_ARRAY_ALLOCATE();
for (int i = 0; i < iterations; i++) {
TOY_ARRAY_PUSHBACK(array, TOY_VALUE_FROM_INTEGER(i));
}
TOY_ARRAY_FREE(array);
return 0;
}