Skip to content

6X slowdown in 1.0.6 loop() #2367

Closed
Closed
@dmd

Description

@dmd

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() {
    Serial1.begin(57600);
}

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

    if (iters == 10000) {
        iters = 0;
        Serial1.println(howlong);
    }

    before = micros();
}

Metadata

Metadata

Assignees

Labels

Component: HardwareSerialThe hardware serial functionality of the core librariesType: RegressionSomething that used to work and now doesn't

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions