Created
January 22, 2024 13:19
-
-
Save jeremysinger/69e68d2f9dced133c61ee6e6a6830a12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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