Skip to content

Changing Compiler Optimization Seems to have no affect. #63

@mjs513

Description

@mjs513

In platforms.txt I changed the optimization level from -Os to -O2 and appears to have no affect performance. Using a coremark sketch that I used before the issue becomes apparent. See this post: https://forum.arduino.cc/t/changing-compiler-optimizations-had-no-affect/1150181/4. In summary:

Uno R4 WiFi (48Mhz, -0s) -  81.81
Uno R4 WiFi (48Mhz, -02) -  81.81
UnoR4 Minima (-02) - 106.75
UnoR4 Minima (-0s) - 106.75

but when I change it for other boards:

Teensy 3.2 (48Mhz -0s)  -  86.23
Teensy 3.2 (48Mhz -02)  - 116.07
Feather M0 (48Mhz -0s)  -   48.61
Feather M0 (48Mhz -02)  -   83.85
CH32V307 Eval(48Mhz -0s) - 91.80
CH32V307 Eval(48Mhz -02) - 116.52

it appears to make a difference. Is there something I am missing or can this be related to the micros issue. From what I saw the time is calculated from using millis()

REF: https://github.com/PaulStoffregen/CoreMark

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions