6X slowdown in 1.0.6 loop()

I'm seeing a 6X slowdown in arduino 1.0.6 loop() as compared to 1.0.5.

To reproduce, run the following sketch under 1.0.5, and note the printed values, which represent the delay in microseconds between the end of one iteration of the loop and the beginning of the next. Then try it again under 1.0.6.

Using 1.0.5 I get 12 uS
Using 1.0.6 I get 72 uS

This is on an ATmega2560.

unsigned long before, howlong, iters;

void setup() {

void loop() {
    howlong = micros() - before;

    if (iters == 10000) {
        iters = 0;

    before = micros();

When dealing with micros(), the arithmetic should be done with 'unsigned long', not 'unsigned int'.


Bug confirmed: