Competing with C in a simple loop