Program compiled with Arduino-ESP32 runs noticeably faster than the same thing on ESP-IDF - why?
Posted: Wed Sep 20, 2017 6:41 am
I am working on a feature for a library I maintain, to use multiple RMT channels to control multiple digital RGB LED strands. The current feature work is here:
https://github.com/MartyMacGyver/ESP32- ... ultistrand
Note: Eventually that work will be merged and the branch removed - at that point, see the main driver at:
https://github.com/MartyMacGyver/ESP32- ... ED-Drivers
My Arduino-ESP32 and ESP-IDF versions are both recent and both from their respective master branches. Build tools are up-to-date for both.
There's an Arduino-ESP32 version of my library and demo as well as an ESP-IDF version - except for some glue and init code switched via #defines they are virtually identical. The odd thing is, even when empty delays are used (which just return in the ESP-IDF stub I use on that side), the Arduino-ESP32 demo always runs noticeably faster than the ESP-IDF one. This is very odd to me... it's as if the MCU clock speed of the ESP-IDF version was quite a bit faster than the Arduino version.
What might lead to this peculiar difference?
https://github.com/MartyMacGyver/ESP32- ... ultistrand
Note: Eventually that work will be merged and the branch removed - at that point, see the main driver at:
https://github.com/MartyMacGyver/ESP32- ... ED-Drivers
My Arduino-ESP32 and ESP-IDF versions are both recent and both from their respective master branches. Build tools are up-to-date for both.
There's an Arduino-ESP32 version of my library and demo as well as an ESP-IDF version - except for some glue and init code switched via #defines they are virtually identical. The odd thing is, even when empty delays are used (which just return in the ESP-IDF stub I use on that side), the Arduino-ESP32 demo always runs noticeably faster than the ESP-IDF one. This is very odd to me... it's as if the MCU clock speed of the ESP-IDF version was quite a bit faster than the Arduino version.
What might lead to this peculiar difference?