
#include <stdio.h>
#include <stdlib.h>

int main () {
   const int len = 10000000;
   short *sig = malloc (len * sizeof(short));

   if (sig) {
      FILE *file = fopen ("speed-c.sw", "w");
      if (file) {
         short *ptr = sig;
         int i = len;
         short acc = 0;
         for (; i>0; i--) {
            *ptr = acc;
            ptr ++;
            acc ++;
            acc %= 10000;
         }
         fwrite (sig, sizeof(short), len, file);
         fclose (file);
      };
   };

   return 0;
}

/*
gcc -O3 -Wall -o dist/build/speedtest-c speedtest/SpeedTest.c
*/
