🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
Teaser Image
atomic14

CODE-SIZE

Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
  Â·     Â·     Â·     Â·     Â·   Posts  Â·   Videos  Â·   Tags  Â·   Tools  Â·   Support

I Made My ESP32-S3 Faster by Optimizing for SIZE — Not Speed

I tuned a hot path on an ESP32-S3 and found the counter-intuitive winner: optimizing for size (-Os) beat optimizing for speed (-O2). On this chip, flash latency and instruction cache behavior dominate—tighter code stays in cache, misses less, and runs faster. Bumping the CPU to 240 MHz, switching flash to QIO, and maxing caches helped too, but -Os still edged out -O2. As always, benchmark your own workload—yours might differ.
06 March 2026
Subscribe!
All content copyright Chris Greening © 2026 • All rights reserved.
Made with Jekyll

This website uses cookies to enhance your browsing experience and analyze site traffic.