Tuesday, February 16, 2010

Walking around the world -- compiling Gentoo Prefix

Given that I'm compiling Gentoo Prefix on a 2.3Ghz Linux host and it is taking several hours I started imaging how much work the computer is actually doing.

2.3 Ghz = 2300000000 cycles per second.

Assuming we only use 10% of the CPU because we are waiting on I/O we are still talking 230000000 cycles per second.

Each cycle represents a very small operation and perhaps only 10 little operations make up some quantum of what a human would consider an "operation" like, "take one step forward." Now we are talking about 23000000 human steps per second.

The average human stride is perhaps 34 inches... leading to 12342 miles worth of steps per second. That means that every two seconds I am asking the computer to walk around the earth. Gentoo prefix is taking several hours to bootstrap so you can figure 3600 seconds in an hour for 3 hours equates to 5363 "walks around the earth" to just bootstrap prefix once.


Oops, the bootstrap just died. I need to tweak something and restart it...


Each of those lines of code has been carefully written/re-written/debugged/versioned by human hands. A person can only write so much code in their lifetime: how many lifetimes of code are flying by me every time I press enter?

No comments:

Post a Comment