Let's find out how well you know computers! All of these programs have a variable NUMBER in them. Your mission: guess how big NUMBER needs to get before the program takes 1 second to run.
You don't need to guess exactly: they're all between 1 and a billion. Just try to guess the right order of magnitude! A few notes:
- If the answer is 38,000, both 10,000 and 100,000 are considered correct answers. The goal is to not be wrong bymore than 10x :)
- We know computers have different disk & network & CPU speeds! We're trying to get you to tell the difference between code that can run 10 times/s and 100000 times/s. A newer computer won't make your code run 1000x faster :)
- That said, all this was run on a new laptop with a fast
SSD and a sketchy network connection. The C code was compiled with
gcc -O2
.
Good luck! We were surprised by a lot of these. We'll be anonymously collecting your answers, so expect some graphs in the future! =D
Made for you by Julia Evans (@b0rk) and Kamal Marhubi (@kamalmarhubi).