Skip to content

Instantly share code, notes, and snippets.

@jeremysinger
Created January 22, 2024 13:19
Show Gist options
  • Save jeremysinger/69e68d2f9dced133c61ee6e6a6830a12 to your computer and use it in GitHub Desktop.
Save jeremysinger/69e68d2f9dced133c61ee6e6a6830a12 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
unsigned int i;
unsigned int x = 0xdeadbeef;
if (argc==2)
x = atoi(argv[1]);
printf("seed value: %x\n", x);
/* long-running computation */
for (i=0; i<1<<30; i++) {
x ^= x << 13;
x ^= x >> 17;
x ^= x << 5;
}
printf("busy computing %x\n\n", x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment