Dhrystone/Whetstone benchmark for esp-idf.
I wanted to know the computing power of the ESP32-C3.
I ported from here.
I ported from here.
Chip | Framework | Versions |
---|---|---|
ESP8266 | ESP8266 RTOS SDK | v3.x |
ESP32 | ESP-IDF | v5.1 |
ESP32-S2 | ESP-IDF | v5.1 |
ESP32-S3 | ESP-IDF | v5.1 |
ESP32-C3 | ESP-IDF | v5.1 |
ESP32-C2 | ESP-IDF | v5.1 |
ESP32-C6 | ESP-IDF | v5.1 |
ESP32-H2 | ESP-IDF | v5.1 |
git clone https://github.com/nopnop2002/esp-idf-benchmark
cd esp-idf-benchmark/
make menuconfig(*1)
make flash monitor
(*1)
You have to change this config.
git clone https://github.com/nopnop2002/esp-idf-benchmark
cd esp-idf-benchmark/
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3/esp32c6/esp32h2}
idf.py menuconfig
idf.py flash monitor
$ xtensa-lx106-elf-gcc --version
xtensa-lx106-elf-gcc (crosstool-NG esp-2020r3-49-gd5524c1) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ xtensa-esp32-elf-cc --version
xtensa-esp32-elf-cc (crosstool-NG esp-12.2.0_20230208) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ xtensa-esp32s2-elf-cc --version
xtensa-esp32s2-elf-cc (crosstool-NG esp-12.2.0_20230208) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ xtensa-esp32s3-elf-cc --version
xtensa-esp32s3-elf-cc (crosstool-NG esp-12.2.0_20230208) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ riscv32-esp-elf-cc --version
riscv32-esp-elf-cc (crosstool-NG esp-12.2.0_20230208) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SoC | Freq(Mhz) | Dhrystone(MIPS) | Whetstone(MIPS) | |
---|---|---|---|---|
ESP8266 | 160 | 57 | 6.2 | |
ESP32 | 160 | 95 | 10.0 | |
ESP32 | 240 | 142 | 16.7 | |
ESP32S2 | 160 | 95 | 8.3 | |
ESP32S2 | 240 | 142 | 12.5 | |
ESP32S3 | 160 | 142 | 10.0 | |
ESP32S3 | 240 | 190 | 14.3 | |
ESP32C3 | 160 | 167 | 8.3 | |
ESP32C2 | 120 | 142 | 8.3 | 26MHz XTAL |
ESP32C6 | 160 | 178 | 12.5 | |
ESP32H2 | 96 | 142 | 5.3 |
The default compile option for esp-idf is Og.
Compile options can be changed in the CMakeLists.txt or menuconfig.
On the ESP32, Changing the compile option to [O2] enables [zero-overhead loops].
zero-overhead loops can execute a loop with a predetermined number of executions without branching overhead.
SoC | Freq(Mhz) | Dhrystone(MIPS) | Whetstone(MIPS) | |
---|---|---|---|---|
ESP32 | 160 | 203 | 33.3 | |
ESP32 | 240 | 316 | 50.0 | |
ESP32S2 | 160 | 178 | 25.0 | |
ESP32S2 | 240 | 283 | 33.3 | |
ESP32S3 | 160 | 237 | 25.0 | |
ESP32S3 | 240 | 356 | 50.0 | |
ESP32C3 | 160 | 407 | 20.0 | |
ESP32C2 | 120 | 356 | 20.0 | 26MHz XTAL |
ESP32C6 | 160 | 474 | 25.0 | |
ESP32H2 | 96 | 237 | 12.5 |