Open edgar-bonet opened 10 months ago
Memory usage change @ 7b7d61dfbfcfbde06d60aef49e6d360e874beb1e
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:avr:LilyPadUSB |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:atmegang:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:atmegang:cpu=atmega8 |
0 - 0 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:bt:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:bt:cpu=atmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:chiwawa |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:circuitplay32u4cat |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | N/A |
arduino:avr:diecimila:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:diecimila:cpu=atmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:esplora |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:ethernet |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:fio |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:gemma |
0 - 0 | 0.0 - 0.0 | 0 - 0 | N/A |
arduino:avr:leonardo |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:leonardoeth |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:lilypad:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:lilypad:cpu=atmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:mega:cpu=atmega1280 |
:small_red_triangle: 0 - +2 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:mega:cpu=atmega2560 |
:small_red_triangle: 0 - +2 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:megaADK |
:small_red_triangle: 0 - +2 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:micro |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:mini:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:mini:cpu=atmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:nano:cpu=atmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:nano:cpu=atmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:nano:cpu=atmega328old |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:one |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:pro:cpu=16MHzatmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:pro:cpu=16MHzatmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:pro:cpu=8MHzatmega168 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:pro:cpu=8MHzatmega328 |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:robotControl |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:robotMotor |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:uno |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:unomini |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:unowifi |
:small_red_triangle: 0 - +2 | 0.0 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:yun |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
arduino:avr:yunmini |
:small_red_triangle: +2 - +2 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
The critical section in
micros()
is longer than it needs to be. The interrupt flag register has to be read within the critical section, but testing whether the overflow count should be incremented can be done with interrupts enabled.Without this pull request, compiling for an UNO I get this critical section:
With the pull request applied, this becomes:
which saves us between 2 and 7 cycles of critical section.