Open
Description
I ran the CoreMark benchmark on Portenta. It's running significantly slower than M7 at 480 MHz should. Most of the poor performance is due to line 14 in variants/PORTENTA_H7_M7/cflags.txt.
-Os
Here's the results from 3 runs on Portenta, 2 of them by editing line 14 in cflags.txt.
Optimization | CoreMark | Code Size |
---|---|---|
-Os | 1127 | 138640 |
-O2 | 1484 | 139680 |
-O3 | 1542 | 142912 |
On AVR and SAMD, optimizing for size (-Os) works well. But on M4 & M7 cores, it costs quite a lot of performance. If you want to give Portenta users a substantial speed boost, just edit line 14 to use better compiler optimizations.