ESP32-S3 vs Arduino Uno: how much faster, really?
240 MHz against 16 MHz is a ratio of 15. The same Arduino sketch, measured on both boards, gives anything from 0.98× to 1248×. The clock is one factor; register width, the FPU, the Arduino core and the serial port decide the rest.
In short
- Adding bytes: 13.6×, close to the 15× clock ratio. 32-bit add, multiply, divide: 60×, 579×, 1248×. The 8-bit AVR needs several instructions or a library routine where the S3 needs one instruction.
floatmultiply: 580× (software on the Uno, FPU on the S3).floatdivide: 127×.doublemultiply: only 22×, because on the S3doubleis software.digitalWrite: only 6.2×. A direct register write: about 1×, a tie.Serialat 115200 baud: 0.98×. The Uno finishes first, because 16 MHz gives 117,647 baud, 2.1% fast.Serial.print(float): 23×, since both cores format afloatas adouble. Arrays: 34× to 166×.
15 times faster?
The Arduino Uno runs its ATmega328P at 16 MHz. The ESP32-S3 runs at up to 240 MHz, and that is the default in arduino-esp32. The ratio is 15, so it is tempting to expect the ESP32-S3 to be 15 times faster.
Measured with the same sketch, the answer depends on the task. For 32-bit division the ESP32-S3 was 1248 times faster. For streaming text over Serial at the same baud rate it was slightly slower.
The rules
One sketch, battle.ino, is built for both boards with the Arduino IDE default settings. On one side is an Uno-compatible board with the same ATmega328P chip (a clone with a CH340 USB bridge, not an original Arduino; the chip marking and its signature 1E 95 0F were checked). On the other side is an ESP32-S3 dev board.
| Uno | ESP32-S3 | |
|---|---|---|
| Chip | ATmega328P, 8-bit AVR, 16 MHz | ESP32-S3 (QFN56) rev v0.2, 32-bit Xtensa LX7, 240 MHz |
| Core | arduino:avr 1.8.8, arduino:avr:uno | esp32:esp32 3.3.12 (built on ESP-IDF 5.5.5), esp32:esp32:esp32s3 |
| Settings | defaults (-Os, LTO) | defaults: 240 MHz, -Os, USB CDC On Boot disabled (Serial is UART0), PSRAM disabled |
sizeof(int / long / double) | 2 / 4 / 4 | 4 / 4 / 8 |
Each arithmetic test is a chain of 1,000 operations (100 iterations of 10 in a row) where every step needs the result of the previous one:
for (int i = 0; i < 1000; i++)
x = x * y; // each step needs the previous x
To stop the compiler from folding the chain into a constant, every step goes through an empty asm statement, BAR(x). It makes the compiler forget what it knows about x, but adds no instructions. The disassembly of every probe was checked on both boards: each one contains exactly the expected instructions or calls, and nothing was folded or removed.
- A test function is called K times, and K doubles until one measurement takes at least 100 ms. Then come 3 runs, and the minimum is taken. Time comes from
micros(). - An empty loop with the same barriers is measured separately and subtracted from the arithmetic and GPIO results (about 21 ns per operation on the Uno, 1.8 ns on the S3).
- The whole sketch was run 5 times on each board, with a reset each time. The tables show the median.
- The key results were cross-checked with each chip's cycle counter. Details are in How the numbers were checked.
Because each step waits for the previous one, this measures latency. Throughput on independent operations can differ; see the note in round 2.
Round 1: integer math
Start with adding two bytes. Both chips do it in about one clock cycle, so the ESP32-S3 wins by 13.6×, close to the clock ratio. (On the S3 an extui instruction is added to cut the result to 8 bits.) So far the megahertz tell the truth.
With 32-bit numbers the picture changes. The Uno is an 8-bit chip, so every extra 8 bits is one more instruction. A 32-bit add is an add followed by three adc (add with carry): 4 cycles. The S3 needs one add.n.
Uno: x = x + y, uint32_t
add r24, r20
adc r25, r21
adc r26, r22
adc r27, r23
ESP32-S3: the same line
add.n a8, a9, a8
Multiplication and division widen the gap further. The ATmega328P has only an 8×8 hardware multiplier (2 cycles) and no divide instruction at all. A 32-bit multiply becomes a call to the library routine __mulsi3 (74 cycles), and a 32-bit divide a call to __udivmodsi4 (594 cycles). The ESP32-S3 has a hardware 32-bit multiplier and divider: mull takes about 2 cycles and quou about 7.
Uno: x = y / x, uint32_t
call __udivmodsi4 ; 594 cycles
ESP32-S3
quou a8, a9, a8 # 7 cycles
| Operation | Uno | Uno cycles | ESP32-S3 | S3 cycles | S3 faster |
|---|---|---|---|---|---|
uint8_t + | 62.8 ns | 1.0 | 4.6 ns | 1.1 | 13.6× |
uint16_t + | 125.7 ns | 2.0 | 4.6 ns | 1.1 | 27× |
uint32_t + | 251.6 ns | 4.0 | 4.2 ns | 1.0 | 60× |
uint8_t × | 251.4 ns | 4.0 | 8.8 ns | 2.1 | 29× |
uint16_t × | 635 ns | 10.2 | 8.8 ns | 2.1 | 72× |
uint32_t × | 4.60 µs | 74 | 8.0 ns | 1.9 | 579× |
uint16_t ÷ | 12.7 µs | 203 | 33.5 ns | 8.0 | 378× |
uint32_t ÷ | 37.1 µs | 594 | 29.7 ns | 7.1 | 1248× |
int + | 125.9 ns | 2.0 | 4.2 ns | 1.0 | 30× |
int × | 635 ns | 10.2 | 8.0 ns | 1.9 | 80× |
On the Uno int is 16 bits; on the ESP32-S3 it is 32 bits. The same sketch computes in 16 bits on the Uno and in 32 bits on the S3, and the Uno is still 30 to 80 times slower.
Round one goes to the ESP32-S3, by 1248×.
Round 2: float and double
The ATmega328P has no floating-point hardware. Every float add or multiply is a software routine (__addsf3, __mulsf3), 133 to 144 cycles. The ESP32-S3 has a single-precision FPU: add.s and mul.s have a latency of about 3.7 cycles. That makes the S3 536 to 580 times faster.
Uno: x = x * y, float
call __mulsf3 ; 144 cycles
ESP32-S3
mul.s f0, f1, f0 # 3.7 cycles
Division is less dramatic. On the S3 a float divide is also a library routine, __divsf3, about 54 cycles. So the gap is 127×.
double works the other way round. On the Uno, double is the same 32-bit type as float: the same __mulsf3, the same time. On the ESP32-S3 double is real 64-bit math, done in software: 98 cycles, 26 times slower than float on the same chip. Against the Uno the S3 is only 22 times faster. (The reverse effect, a float sketch accidentally doing double math on the S3, is covered in One letter makes your ESP32-S3 math 17× slower.)
| Operation | Uno | Uno cycles | ESP32-S3 | S3 cycles | S3 faster |
|---|---|---|---|---|---|
float + | 8.30 µs | 133 | 15.5 ns | 3.7 | 536× |
float × | 8.99 µs | 144 | 15.5 ns | 3.7 | 580× |
float ÷ | 28.7 µs | 459 | 227 ns | 54.5 | 127× |
sin(x) + 0.5, float x | 112.8 µs | 1805 | 714 ns | 171 | 158× |
double × | 8.99 µs | 144 | 409 ns | 98 | 22× |
In a sketch, sin(x) with a float x calls the float overload from <cmath>, so on the S3 it stays in single precision.
These are dependent chains. With four independent chains of float multiplies, the S3's pipelined FPU reached about 1 cycle per mul.s, while the Uno stayed at about 153 cycles. On independent operations the gap approaches 2000×. The tables use the more conservative chain figures.
Round 3: digitalWrite
Toggling a pin with digitalWrite takes the Uno about 3.27 µs per call (pin 13) and the ESP32-S3 about 0.52 µs (GPIO4). The S3 is only 6.2 times faster, less than the clock ratio.
The reason is that in both cores digitalWrite is a function that does real work before it touches the pin.
void digitalWrite(uint8_t pin, uint8_t val)
{
uint8_t timer = digitalPinToTimer(pin);
uint8_t bit = digitalPinToBitMask(pin);
uint8_t port = digitalPinToPort(pin);
volatile uint8_t *out;
if (port == NOT_A_PIN) return;
// If the pin that support PWM output, we need to turn it off
// before doing a digital write.
if (timer != NOT_ON_TIMER) turnOffPWM(timer);
out = portOutputRegister(port);
uint8_t oldSREG = SREG;
cli();
if (val == LOW) {
*out &= ~bit;
} else {
*out |= bit;
}
SREG = oldSREG;
}
On the Uno that is three table lookups in flash (port, bit mask, timer), a check that the pin exists, turnOffPWM() if the pin is on a PWM timer, a fourth flash read for the port register address, then saving SREG, disabling interrupts, a read-modify-write of the port and restoring SREG. Pin 13 has no timer, so it only pays for the check: 52 to 57 cycles (3.3–3.6 µs). Pin 5 is a PWM pin and takes about 73 cycles (4.6 µs).
extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val) {
#ifdef RGB_BUILTIN
if (pin == RGB_BUILTIN) {
//use RMT to set all channels on/off
RGB_BUILTIN_storage = val;
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
rgbLedWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
return;
}
#endif // RGB_BUILTIN
if (perimanGetPinBus(pin, ESP32_BUS_TYPE_GPIO) != NULL) {
gpio_set_level((gpio_num_t)pin, val);
} else {
log_e("IO %u is not set as GPIO. Execute digitalMode(%u, OUTPUT) first.", pin, pin);
}
}
On the S3, digitalWrite checks for the built-in RGB LED (only on boards that declare one), asks the peripheral manager whether the pin is a GPIO (perimanGetPinBus), and then calls ESP-IDF's gpio_set_level(). That is about 125 cycles just to set one pin.
| digitalWrite | Time | Cycles |
|---|---|---|
| Uno, pin 13 | 3.27 µs | 52–57 |
| Uno, pin 5 (PWM) | 4.6 µs | ~73 |
| ESP32-S3, GPIO4 | 523 ns | 126 |
Writing the register directly
Skipping digitalWrite and writing the GPIO register directly removes the core overhead. Here the result is a tie.
PORTB = hi; PORTB = lo; // Uno: out, 1 cycle
REG_WRITE(GPIO_OUT_W1TS_REG, 1 << 4); // S3: ~15 cycles
- Uno.
PORTB |= _BV(5)compiles tosbi, 2 cycles (125 ns). Writing the whole port,PORTB = x, compiles toout, 1 cycle (about 63 ns). - ESP32-S3.
REG_WRITE(GPIO_OUT_W1TS_REG, …)took about 15 cycles per write in a row (61 ns).
At their clock speeds both come out at about 60 nanoseconds. The S3 is 2.1 times faster than sbi and level with out.
| Register write | Time | Cycles | Pin frequency |
|---|---|---|---|
Uno, sbi / cbi | 125.7 ns | 2.0 | 3.5 MHz |
Uno, out (whole port) | ~63 ns | 1.1 | 6.3 MHz |
ESP32-S3, REG_WRITE | 61.1 ns | 14.7 | 8.0 MHz |
The edges were counted on the actual pin, without wires: on the Uno by Timer1 in external-clock mode on its T1 input (D5), which the datasheet says counts transitions even when the pin is an output; on the S3 by the pulse counter (PCNT) through the GPIO matrix.
Why a GPIO register write on the S3 costs about 15 CPU cycles is not explained in Espressif's documentation, so this page reports only the measurement.
The ESP32-S3 can drive a pin with a CPU instruction, ee.wr_mask_gpio_out, in one cycle (4.2 ns in this test). Espressif's TRM says that this way “you can get faster response than pulling pins through register configurations.” The pin was seen toggling at 20 MHz with every edge counted. It needs extra setup through ESP-IDF (dedic_gpio_new_bundle()); see the end of battle.ino.
Score after three rounds: ESP32-S3 two, Uno zero, one tie.
Round 4: Serial
Both boards call Serial.begin(115200) and send the same text: 42 lines of 47 bytes, 1974 bytes in total. Here the processor does not matter. The port can only send so many bits per second.
The Uno finishes first, by about 2%. The ESP32-S3 sends exactly 115,200 baud. The Uno cannot: its USART divides the 16 MHz clock by an integer, and 115,200 does not come out exactly. The AVR core first tries double-speed mode (U2X):
// ArduinoCore-avr 1.8.8, HardwareSerial::begin()
// Try u2x mode first
uint16_t baud_setting = (F_CPU / 4 / baud - 1) / 2; // (34 - 1) / 2 = 16
With U2X the baud rate is fOSC / (8 × (UBRR + 1)), so UBRR = 16 gives:
16 000 000 / (8 × (16 + 1)) = 117 647 baud → +2.1 %
The ATmega328P datasheet lists exactly this: for 16 MHz and 115.2k, UBRR = 16 with U2X and an error of +2.1% (without U2X, UBRR = 8 and −3.5%). It was confirmed both by the time on the board and on the PC side: over a 27-second stream the PC measured 117,661–117,663 baud from the Uno and 115,235–115,247 baud from the S3, with no corrupted lines out of about 6,700.
Round four goes to the Arduino Uno, by 2%.
When print() returns
The stream time is set by the port, but the time a single print() call takes to return depends on buffering.
| print() returns after | Uno | ESP32-S3 | S3 faster |
|---|---|---|---|
| 21 bytes | 140 µs | 15 µs | 9.3× |
| 126 bytes (6 prints in a row) | 5.20 ms | 88 µs | 59× |
- Uno. The AVR core has a 64-byte software transmit buffer (
SERIAL_TX_BUFFER_SIZEis 64 on chips with enough RAM, 16 otherwise). A 126-byte burst does not fit, so the sketch waits about 5.2 ms while the port drains the buffer. - ESP32-S3. arduino-esp32 creates
HardwareSerialwith_txBufferSize(0): no software transmit buffer by default. In that case ESP-IDF'suart_write_bytes()returns once all data is “at least pushed into TX FIFO”. The UART's hardware TX FIFO is 128 bytes by default, so 126 bytes fit entirely and the call returns after 88 µs. The buffer size can be changed withsetTxBufferSize()beforebegin().
Printing a float
There is a twist inside print, too. This test prints to a Print object that discards the bytes, so only the formatting is measured.
| Formatting | Uno | Uno cycles | ESP32-S3 | S3 cycles | S3 faster |
|---|---|---|---|---|---|
println(float, 2) | 262 µs | 4195 | 11.6 µs | 2782 | 22.6× |
println(long) | 240 µs | 3837 | 1.51 µs | 361 | 159× |
Float math was 580 times faster on the S3, but printing a float is only 23 times faster. Both Arduino cores have no print(float) overload. A float is promoted to double and goes through the same function:
size_t Print::printFloat(double number, uint8_t digits)
On the Uno that costs nothing, because double is the same 32-bit type. On the S3, double is software, and the disassembly of the formatting code is full of __adddf3, __muldf3, __divdf3 and other double-precision routines. Printing a long, which needs only 32-bit integer division, is 159 times faster.
Round 5: arrays and memory
| Operation, 512 bytes | Uno | Uno cycles | ESP32-S3 | S3 cycles | S3 faster |
|---|---|---|---|---|---|
sum of bytes into an int | 571 ns | 9.1 | 17.0 ns | 4.1 | 34× |
sum of uint32_t words | 272 ns | 4.3 | 3.3 ns | 0.8 | 81× |
memcpy | 508 ns | 8.1 | 3.1 ns | 0.7 | 166× |
Summing 32-bit words is faster than summing bytes on the S3 because it moves four bytes with every load. For memcpy the Uno spends 8 cycles per byte (ld, st, sbiw, brne), while the S3 copies whole words.
Then there is size. The ATmega328P has 2 KB of SRAM for everything; this sketch, with two 512-byte buffers, already uses 61% of it. The ESP32-S3 has 512 KB of SRAM on the chip. Not all of it is free for variables (part can be configured as cache, and ESP-IDF uses some), but the difference is still more than a hundredfold. Some programs simply do not fit on the Uno at all.
The verdict
So how much faster is the ESP32-S3? Anywhere from a little slower to over a thousand times. Score: ESP32-S3 three, Uno one, one tie. The clock ratio explains only the simplest case, adding bytes. The other factors matter as much:
- Register width. 8-bit AVR against 32-bit Xtensa: 32-bit integer math is 60× to 1248× faster.
- The FPU. Single-precision
floatin hardware on the S3, in software on the Uno: about 580×.doubleis software on the S3, and the gap drops to 22×. - Overhead inside the Arduino core.
digitalWriteis a function with checks on both boards: only 6.2×.print(float)goes throughdouble: 23×. - The speed of the port. At the same baud rate the processor does not matter, and the Uno's rounded baud rate makes it 2% faster.
Before switching boards for speed, measure what your code is actually waiting for.
How the numbers were checked
- Repeats. Five full runs of
battle.inoon each board, with a reset each time. The spread between runs was below 0.01% on every test. On the Uno the runs matched byte for byte (the AVR has no caches and is fully deterministic); on the S3 they differed by 1–4 µs per ~100 ms. - A different clock. Separate cross-check sketches ran 3 times on each board and timed the tests in CPU cycles without
micros(): on the Uno with Timer1 at prescaler 1 and themillis()interrupt off, on the S3 with the CCOUNT register and interrupts off. The results agree with the main measurement within 0.5% (on the Uno,micros()reads slightly high because of themillis()interrupt). - The clock frequency. On the S3, CCOUNT over 1 second measured by
esp_timergave 239,999,571 to 239,999,649 cycles, so 240 MHz. Against the PC clock over 27 seconds: Uno 1.00011, S3 1.00031. The PC is not a reference, but this does not affect the ratios. - The real pin. A hardware edge counter on the same pin (see above): 20,000 HIGH writes gave exactly 20,000 edges.
- The port from the PC side. 27 seconds of a line stream received on the PC: Uno 117,661–117,663 baud, S3 115,235–115,247 baud, no corrupted lines.
| Test | Uno micros | Uno Timer1 | S3 micros | S3 CCOUNT |
|---|---|---|---|---|
uint8_t + | 1.0 | 1.1 | 1.1 | 1.1 |
uint32_t + | 4.0 | 4.4 | 1.0 | 1.0 |
uint32_t × | 73.7 | 73.3 | 1.9 | 1.9 |
uint16_t ÷ | 203 | 202 | 8.0 | 8.0 |
uint32_t ÷ | 594 | 590 | 7.1 | 7.1 |
float + | 133 | 132 | 3.7 | 3.7 |
float × | 144 | 143 | 3.7 | 3.7 |
float ÷ | 459 | 457 | 54.5 | 54.2 |
sin(float) + | 1805 | 1795 | 171 | 171 |
double × | 144 | — | 98.1 | 97.7 |
digitalWrite | 52.3 (D13, LTO) | 57.0 (D13) | 125.6 | 124.9 |
| register write | 2.0 (sbi) | 2.1 (sbi), 1.1 (out) | 14.7 | 14.6 |
| dedicated GPIO | — | — | 1.0 | 1.0 |
Mistakes caught along the way
A benchmark like this is easy to get wrong, mostly because of the optimizer. These were found by the checks above and fixed before the final runs:
| Problem | How it showed up | Fix |
|---|---|---|
LTO on the Uno removed a memcpy into a buffer nobody read | 1.45 µs for 512 bytes, physically impossible; the function was a bare ret | the buffer is passed to an asm barrier and read |
LTO on the Uno computed the float printing at compile time (the input was a constant global), giving 15.3× | disassembly audit of all tests: no float operations in the formatting test | volatile input; the result became 22.6× |
The Serial stream line was 47 bytes, not 48 | the baud rate was off by the same 2% on both boards | the sketch computes the length with strlen_P |
Test setup and code
| Board 1 | Uno-compatible board, ATmega328P @ 16 MHz, CH340 USB bridge |
| Board 2 | ESP32-S3 (QFN56) rev v0.2, 240 MHz, 16 MB flash, 8 MB PSRAM (disabled), CH343 USB bridge on UART0 |
| Cores | Arduino AVR 1.8.8 (arduino:avr:uno); arduino-esp32 3.3.12 (esp32:esp32:esp32s3), Arduino IDE default settings |
| Method | chains of 1,000 dependent operations, micros(), K repeats until ≥ 100 ms, minimum of 3, loop overhead subtracted; median of 5 runs |
| Cross-check | CPU cycles via Timer1 (Uno) and CCOUNT (S3), edge counting on the pin, baud rate measured on the PC |
The measurements apply to the ESP32-S3 and the ATmega328P with these cores and settings. Other ESP32 chips and other compiler settings were not measured.
#if defined(__AVR__)
#define BAR(x) asm volatile("" : "+r"(x))
#define BARF(x) asm volatile("" : "+r"(x))
#define TEST_PIN 13
#else
#define BAR(x) asm volatile("" : "+r"(x))
#define BARF(x) asm volatile("" : "+f"(x)) // float in an FPU register
#define TEST_PIN 4
#endif
#define REP10(s) s s s s s s s s s s
volatile uint32_t sink32;
// a chain of 1000 dependent operations; BAR(x) stops constant folding
#define TEST_INT(fname, T, X0, Y0, OP) \
__attribute__((noinline)) void fname() { \
T x = X0, y = Y0; BAR(x); BAR(y); \
for (uint8_t i = 0; i < 100; i++) { REP10(OP; BAR(x);) } \
sink32 = x; \
}
TEST_INT(add_u32, uint32_t, 1, 3, x = x + y)
TEST_INT(mul_u32, uint32_t, 1, 3, x = x * y)
// division: x -> y / x, the values alternate (300 <-> 200)
TEST_INT(div_u32, uint32_t, 1234, 1000000, x = y / x)
// ... float, double, GPIO, print and array tests: see the full file
#define TARGET_US 100000UL
void measure(const __FlashStringHelper *group, const __FlashStringHelper *name,
void (*fn)(), uint16_t ops) {
fn(); // warm-up (flash cache on the ESP32-S3)
uint32_t K = 1, dt;
for (;;) { // double K until it takes >= 100 ms
uint32_t t0 = micros();
for (uint32_t k = 0; k < K; k++) fn();
dt = micros() - t0;
if (dt >= TARGET_US) break;
K *= 2;
}
uint32_t best = dt;
for (uint8_t r = 0; r < 3; r++) { // then 3 runs, keep the minimum
uint32_t t0 = micros();
for (uint32_t k = 0; k < K; k++) fn();
dt = micros() - t0;
if (dt < best) best = dt;
}
// prints "R,<group>,<name>,<K>,<ops>,<us>"; the PC subtracts the baseline
}
Also: xcheck_uno.ino, the Uno cross-check with Timer1 cycle counting, edge counting on T1 and the 30-second serial stream.
Sources
- Microchip ATmega328P datasheet (DS40002061B) “High Performance, Low Power AVR® 8-Bit Microcontroller” · “On-chip 2-cycle Multiplier” · Table 20-7, 16 MHz, 115.2k: U2X=1 → UBRR 16, 2.1% · “transitions on the T1 pin will clock the counter even if the pin is configured as an output” ·
OUT1 cycle,SBI/CBI2 cycles - Arduino UNO R3 and its datasheet “Arduino UNO is a microcontroller board based on the ATmega328P.” · “a 16 MHz ceramic resonator” · “2 kB SRAM”
- ESP32-S3 Series Datasheet “Xtensa® dual-core 32-bit LX7 microprocessor” · “Clock speed: up to 240 MHz” · “Support for single-precision floating-point unit (FPU)” · “32-bit multiplier and 32-bit divider” · “512 KB on-chip SRAM”
- ESP32-S3 Technical Reference Manual “All three UART controllers on ESP32-S3 share 1024 × 8 bits of RAM … divided into 8 blocks, each having 128 × 8 bits” · on
EE.WR_MASK_GPIO_OUT: “you can get faster response than pulling pins through register configurations” - ESP-IDF v5.5: Speed Optimization (ESP32-S3) “Avoid using double precision floating point arithmetic double. These calculations are emulated in software and are very slow.”
- ESP-IDF v5.5: Dedicated GPIO “A GPIO bundle is a group of GPIOs, which can be manipulated at the same time in one CPU cycle.” · “call dedic_gpio_new_bundle() to allocate the software resources”
- ESP-IDF v5.5: UART
tx_buffer_size: “If set to zero, driver will not use TX buffer, TX function will block task until all data have been sent out.” ·uart_write_bytes: “or at least pushed into TX FIFO” - ArduinoCore-avr 1.8.8: wiring_digital.c, HardwareSerial.cpp, HardwareSerial.h, Print.cpp “Try u2x mode first” ·
#define SERIAL_TX_BUFFER_SIZE 64·size_t Print::printFloat(double number, uint8_t digits) - arduino-esp32 3.3.12: esp32-hal-gpio.c, HardwareSerial.cpp, HardwareSerial.h, Print.cpp, boards.txt
perimanGetPinBus(pin, ESP32_BUS_TYPE_GPIO)·_txBufferSize(0)· “if not using CDC on Boot, Arduino Serial is the UART0 device” ·size_t Print::printFloat(double number, uint8_t digits) - Arduino Reference: double “On the Uno and other ATMEGA based boards, this occupies 4 bytes. That is, the double implementation is exactly the same as the float, with no gain in precision.”
- cppreference: std::sin
float sin ( float num );
Video
A short video on the same topic is on the ESPSSS YouTube channel (6:01, 2026-11-19). This page goes into more detail.
Also as a YouTube Short.