Skip to content

External symbol definition sidelining Arduino.h include conflicts with inlining work in ESP8266 #16

Closed
@dok-net

Description

@dok-net

I am speeding up optimistic_yield() in ESP8266 master from idle 80 cycles to 32 cyles by inlining the usually constexpr parameter conversion from µs to cycles.
Writing directly inlined code in Arduino.h, This conflicts with src/inner.h line 2598:

extern void optimistic_yield(uint32_t); 

requiring an external symbol.
In PR esp8266/Arduino#6804 I'm working around this by using the preprocessor. Cleaning this up would be better for typesafety etc.

@earlephilhower Grep'ing for use of optimistic_yield in bearssl, I would believe that the PR speeds up bearssl noticeably? Both the idle cycle reduction, and the corrected behavior of not yielding on every optimistic_yield after 10000us in the same loop iteration, but only each 10000µs between yields, should make a difference. Could you please review and comment in the PR log, maybe providing rationale from your POV there, what the expected behavior of optimistic_yield was anyway? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions