ish/tests/looper.c
Theodore Dubois 8cd8c258e7 Add a nice little looping benchmark
Currently shows ish with optimizations on is 20 times slower than a real
chip. I'm hoping I can get that down to 10 times slower.
2017-06-05 03:23:05 -07:00

13 lines
217 B
C

#include <unistd.h>
#include <stdio.h>
void nop();
int main() {
int loops = 100000000;
printf("looping %d times\n", loops);
for (int i = 0; i < loops; i++)
nop();
printf("done looping\n");
}