To get an idea of how big 2×1031 is, suppose it were possible to execute the body of the while loop in 1 nanosecond. There are 109 nanoseconds in a second, which means it would take
to seach through all values (which is the worst case). There are roughly 31×106 seconds in a year, giving
to search through all the values. In comparison, the universe is believed to be between 10 and 20 billion years old.
This page last modified on 24 January 2006.