Monday, October 29, 2007

Geek Glimmerings #1 - Random-Access Kindergarten

They say most people can't remember anything before the age of about 5. For someone in the tech world, that's just so wrong. By the time I was 5, I already knew I was destined for a career in high tech!

At age 5 in kindergarten, I would do the little alphabet assignments in my little notebook. Every day the teacher would say "open your notebooks to a new page" and go from there. Now, it soon became clear to me that we were never asked to refer back to any previous day's work. And those notebooks had a lot of pages, way more than we would need in any school term. You can see where this is going. It was much faster just to open to a random page, and if the page was already used, repeat as needed until arriving at a blank page.

When I had the chance to work on the IBM compiler book "Optimization Guide for Fortran, C, and C++", it all made perfect sense -- all the caching and page-faulting techniques from kindergarten!