Empirical analysis of the Xtensa LX7 vector unit (PIE) vs. Octal PSRAM memory bus constraints.
Question asked: Can the ESP32-S3 vector extensions (Xtensa LX7 128-bit SIMD instructions) meaningfully accelerate the DNS blocklist lookup and merge pipeline?
Finding: No. Every kernel touching the large domain arrays is strictly bound by Octal PSRAM bus bandwidth, not ALU execution width. Benchmarks demonstrate that 128-bit SIMD loads from PSRAM measure identically to scalar 32-bit loads. A wider ALU cannot accelerate a kernel stalled on external memory buses.
Empirical throughput in MB/s on ESP32-S3 at 240 MHz CPU, 32 KB DCache, tested across memory domains:
| Load / Copy Method | IRAM → IRAM | PSRAM → IRAM | PSRAM → PSRAM |
|---|---|---|---|
| 8-bit scalar loop | 45.8 MB/s | 29.4 MB/s | 19.5 MB/s |
| 32-bit scalar loop | 228.9 MB/s | 58.1 MB/s | 21.2 MB/s |
| 64-bit scalar loop | 305.1 MB/s | 56.8 MB/s | 21.2 MB/s |
Standard libc memcpy | 366.0 MB/s | 56.8 MB/s | 21.2 MB/s |
| PIE 128-bit SIMD (16 B/iter) | 1,207.6 MB/s | 58.1 MB/s | 21.1 MB/s |
| PIE 128-bit SIMD (32 B/iter) | 1,829.8 MB/s | 58.1 MB/s | 21.1 MB/s |
Espressif dsps_memcpy_aes3 | 1,444.9 MB/s | 57.6 MB/s | 21.0 MB/s |
Observation: Inside internal SRAM/IRAM, 128-bit SIMD provides a massive 5× speedup (366 → 1,830 MB/s). But when reading from external PSRAM, scalar 32-bit, libc, and 128-bit SIMD all plateau between 56.8 and 58.1 MB/s. Quadrupling load width yields zero throughput increase once data resides behind the MSPI cache.
Measurements show that a single 32-byte cache line miss from PSRAM consumes:
esp_async_memcpy) cannot rescue the bottleneck: hardware arbitration yields lower throughput than CPU loops for PSRAM → IRAM transfers.Because ALU widening does not address the bus bottleneck, performance was maximized through memory reduction:
.com) eliminating redundant binary search probes.