How to make your ESP32-S3 code faster. @atomic14
How to make your ESP32-S3 code faster.  @atomic14
Uploaded March 2026 | Updated September 2026, 1 week ago
Thanks to PCBWay.com/?from=atomic for the fantastic PCBs and SMT assembly.

I was trying to squeeze more performance out of an ESP32-S3 and ended up with a result I didn’t expect: optimizing for size was faster than optimizing for speed.

In this video, I benchmark different ESP-IDF settings and show what actually made the biggest difference.

The ESP32-S3 is a seriously capable little CPU, but getting the most out of it isn’t always obvious.

I started with a completely stock ESP-IDF configuration and used a simple but CPU-heavy benchmark: decoding an embedded animated GIF from flash. From there, I measured the impact of a number of common performance tweaks:

• CPU clock speed (160 MHz vs 240 MHz)
• Compiler optimization level (-Os vs -O2)
• Flash SPI mode (DIO vs QIO)
• Instruction and data cache sizes

What surprised me most was that “optimize for size” consistently beat “optimize for performance” in this workload - even before touching the cache settings. Once the caches were increased, the results got even more interesting.

If you’re working on performance-critical ESP32 projects (graphics, codecs, emulation, signal processing), hopefully this gives you a few useful ideas - and maybe challenges a couple of assumptions.

Let me know your findings in the comments!

Thanks for watching!

00:00 The ESP32-S3 and why performance matters
00:36 The benchmark: decoding an embedded GIF
01:03 Baseline results (stock ESP-IDF)
01:43 CPU frequency: 160 MHz vs 240 MHz
02:14 Compiler optimizations: -Os vs -O2
03:32 Flash SPI mode: DIO vs QIO
04:10 Cache configuration (instruction & data cache)
05:08 Turning everything up to 11
05:55 Revisiting -O2 with larger caches
06:14 The winning configuration
06:22 Final thoughts

---
If you'd like to help support the channel and help me buy more nonsense - I have a Patreon page: patreon.com/atomic14

We've also got a shop now! shop.atomic14.com

And if you're shopping on AliExpress or Amazon then if you click on these links I will get a little bit of affiliate money:

Aliexpress - https://s.click.aliexpress.com/e/_Ac05mF
Amazon - amazon.com/?tag=atomic14-20

You can also join us on Discord here: discord.gg/h2DDnDdjD2

There's also the Atomic14 newsletter here: atomic14.substack.com

And don't forget about the MakerNews newsletter - makernews.substack.com
How to make your ESP32-S3 code faster.We werent really going for speed - but this gets quite fast...Streaming Video From an SD Card on the ESP32.ESP32 Walkie-Talkie: DIY Audio MagicPCB Mistake Turns into Vacuum Stencil Experiment | MHP30 Hotplate TestMaking this CR*P Night Light GOODThis really SUCKS.... and I love it!ESP32 Audio DMA Settings Explained - dma_buf_len and dma_buf_countSuper Easy ESP32-S3 Dev Board#shorts - 20,000mAh? https://youtu.be/PEHDVoAE8sEHarvesting Solar Power for Low-Energy Electronics: Can We Run Forever on Scottish Winter Sun?ChatGPT Cocktail Bot In Action
atomic14 |

How to make your ESP32-S3 code faster.

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER