Speed Differences Among Arduino Boards

I thought it would be interesting to compare the speeds of various Arduino boards, from older designs to the newest microcontrollers. I looked at the following:

  • Arduino Uno R3 (ATmega328P) for the baseline board
  • Arduino Nano Every (ATmega4809) running at 20 MHz
  • Arduino Nano 33 IoT (SAMD21)
  • Arduino Nano RP2040 Connect (RP2040)
  • Arduino Uno R4 (Renesas RA4M1)
  • Arduino Nano ESP32 (ESP32)

Note that the Nano 33 IoT, the Nano RP2040, and the Uno R4 (WiFi version) all have an ESP32 as a coprocessor for the radio functionality. The Nano ESP32 uses an ESP32 for both radio and as the main microcontroller. This can be done reliably because of the dual core CPU and the use of FreeRTOS.

I ran four tests:

  • Sieve test to find prime numbers. This uses bit flags and does lots of bit shifting and testing. It does not do any multiplication or division
  • Brute test to find prime numbers. “Brute Force” testing for divisibility. Lots of divisions.
  • Float test calculating a sine table.
  • Pulse test to measure the minimum pulse width using the digitalWrite function.

The list of the boards is the order of performance from slowest to fastest, except that the Uno R4 was slower than the RP2040 in the sieve test. The ESP32 was roughly 100x faster than the Uno R3, although the operating system (FreeRTOS) that runs on the ESP32 made the performance erratic. Not of the other boards were running an RTOS. Here’s a table of the relative execution speeds:

SieveBruteFloatPulse
ATmega328P1111
ATmega4809 (at 20 MHz)1.271.271.281.24
SAMD217.9113.251.351.88
RP204024.9441.784.403.51
Renesas RA4M111.6656.5732.404.00
ESP3241.91324.27135.1210.03
Performance relative to ATmega328P

Here is a photo of the boards. I’m showing a Nano rather than a Uno R3, but they use the same microcontroller chip.

The six different microcontrollers