int main() { for(register char c = 0; c < 5; c++) { printf("%c\t", myrand(33, 126)); }
putchar('\n'); return 0; }
Name:
Anonymous2019-09-15 18:49
In HolyC you could store that entire string within a cpu register avoiding costly memory instructions.
Performance increase of ~60x.
In C you could avoid memory access thusly: -
#include <time.h> #include <stdio.h>
int main() { register unsigned int next = time(NULL);
for(register int c = 0; c < 5; c++) { next = next * 1103515245; next = next + 12345; next = next / 65536; next = next % 94; next = next + 33; putchar(next); putchar('\t'); } return 0; }