Mike Douglas

I am a student from Vancouver, Canada.

April 2, 2010 at 5:52pm

I’m glad the Apple ][+ came with schematics for the circuit boards. I’m glad it encouraged a generation of kids to tinker and explore. I’m also glad that I don’t live in the fucking ’70s and have to type in programs from a magazine anymore.

— Josh Johnson

March 22, 2010 at 10:28pm

Branch Prediction Hinting

From the Linux kernel:

#define likely(x) _builtin_expect((x), 1)
#define unlikely(x) _builtin_expect((x), 0)

void foo(int arg)
{
     if (unlikely(arg == 0)) {
           do_this();
           return;
     }
     do_that();
     ...
}