I started solving Project Euler problems with Python as a COVID hobby. I solved 216 problems between June 2020 an April 2023. In September 2025 I began to redo solved problems in C++ and executing them on embedded systems. Below I document the embedded solution times and hardware used. Given variations in runtime, I only benchmark to two significant digits. See my Microcontrollers section for technical specs. Below is example code for how I measure the execution time.
void loop(){
parameter = Serial.parseInt(); //waits for input
if (parameter>0){
runtime = micros(); //grab the start time
for (int i=0,i<100;i++){
//compute the problem here, 100 times
}
runtime = micros() - runtime;
Serial.println(answer);
Serial.println(runtime/100.0);
}
parameter = 0;
}
First 100 Problems
| Problem | RP2040 | ATSAMD21G18A | R7FA4M1 | MEGA32U4 |
|---|---|---|---|---|
| 1 | .58 ms | 7.4 ms | ||
| 2 | 1.5 us | 2.1 us | ||
| 3 | 10 ms | |||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
