Skip to content

Benchmark report

This page puts the benchmark work in one place: MicroGoose before any performance work, after it, against the other implementations, and what is left. It adds no measurement of its own. Every figure in its tables is a median from the runs behind Results, written by bench/final.py, and each statement links to the page that shows it:

  • Methodology: the boards, the suite and how each implementation runs it.
  • Results: every run's table, with p99, maxima and sizes.
  • Findings: what the baseline showed.
  • Optimizations: each change, with its cause, its before and after, and everything else that moved.

In short

  • Before. MicroGoose matched C on floating-point loops and was ahead on CRC-32 and on waking for a timer beside a busy worker. It was 13 to 18 times behind C at passing messages on the ESP32s, 18 times behind at spawning on the S3, and 9 to 14 times behind on floating point on the H7, whose FPU it didn't use. On the WROOM it couldn't start a second worker.
  • After the changes no benchmark's median is more than 1 µs slower than at the baseline, on any board. Messages from a worker now take 0.81 and 0.60 of C's time on the ESP32s, and 1.35 times C's on the H7. Floating point on the H7 is at most 4% behind C built for the FPU. A spawn takes 0.66 of C's time on the H7 and 1.6 to 1.7 times C's on the ESP32s. The WROOM runs the whole suite with 4 KB data stacks for its workers, and as built in all but one boot of 15.
  • Still behind C: heapsort at 1.9 to 2.1 times, spawning on the ESP32s at 1.7 and 1.6, queue_2000 on the H7 at 1.35, the queue round trip on the S3 at 1.7, and matmul_f32 on the ESP32s at 1.3 and 1.4.
  • Against the others. Rust on Embassy starts a task 35 to 62 times faster and passes messages faster, without preemption. TinyGo is faster at CRC-32 and behind where its runtime runs the chip slower or without its FPU. MicroPython is 9 to 900 times slower at computing.
  • What it cost. The ESP32 images are 32 and 35 KB larger than at the baseline: 10 and 11 KB by the ninth change, and 21 and 23 KB more with the pin benchmarks and sections 10 and 11. A program's timers take the chip's four hardware timers. Queue nodes stay allocated once used: up to 4 KB on the ESP32s, and on the H7 and the Pico 2 W up to a quarter of the free heap (section 13).
  • Twelve correctness defects showed up while measuring, two of them on the Pico 2 W. Ten have fixes in MicroGoose, one is in the Goose runtime, and one turned out not to happen.

What was measured

Three boards: an ESP32-S3 (240 MHz, 2 cores, 8 MB PSRAM), an ESP32 WROOM-32 (240 MHz, 2 cores, no PSRAM) and an STM32H743 (400 MHz, 1 core). One suite of 18 benchmarks, written in each language the way someone fluent in it would write it: integer and floating-point loops, reading the clock, a typed queue, a round trip through two queues, spawning a worker, the same work on 1, 2 and 4 workers, a 1 ms timer with and without a busy worker, and a fault contained in a worker. Each run is 5 boots, and each table cell is the median of every sample from every boot.

Four more benchmarks were added on 2026-12-04, in Goose and C only: a pin's edges, with and without a busy worker (Pin edges). MicroGoose's latest runs have them; C's pin rows come from a run of that group alone.

Three things to keep in mind when reading a ratio:

  • Equal priorities, not tuned C. The C reference runs its tasks at the priorities and stack sizes MicroGoose uses. Beside a busy worker its timer task waits for the time slice. A C programmer would raise that task's priority.
  • On the H7, C is c-fpu: the same C built for the FPU, as MicroGoose now is. At the baseline MicroGoose used software floating point, like PlatformIO's default build of C.
  • On the WROOM, "now" has two columns: as built, and with --worker-reserve 4K (section 9). Both now run the whole suite. As built that is near the board's limit: one boot of 15 was refused scale_4w's threads (section 12), and until sections 9 and 10 the suite stopped there every time. Where a figure below has one WROOM number, it is the 4 KB run's.

"Baseline" is MicroGoose at perf-baseline (revision d9d2275). "Now" is the latest run on each board, made on 2026-12-05 with Goose v2026.5, after section 13: c47a0bd on the ESP32s and 9b3ff3b on the H7 and the Pico 2 W, whose code is the same at both. Sections 1 to 9 measured their changes with v2026.4. The other implementations' runs are the ones in Results.

Before: the baseline

Findings has the detail. Against C, at the baseline:

  • Level: mandel_f64, mandel_f32, clock_1000 on the ESP32s, the timers' periods, and the same work on a worker as on the main program.
  • Ahead: crc32 (0.71 to 0.90 of C's time), and the wake for a timer beside a busy worker, where C waits for its time slice.
  • Behind: messages (queue_2000 at 13, 18 and 5 times C), the round trip (4.7, 4.6 and 2.0), spawning (18, 3.1 and 4.8), matmul_f32 (3.0 and 3.5 on the ESP32s), heapsort (2.0 to 2.2), the H7's clock (3.1) and the idle timer wake on the ESP32s (1.6 and 1.7).
  • Hardware left unused: the H7's FPU. Floating-point work took 9 to 14 times as long as c-fpu.
  • A limit: on the WROOM the second worker of scale_2w was refused its data stack, so the scaling benchmarks didn't run there.

What changed

Each change was profiled first, made on its own, and followed by the full suite, the conformance samples and the stress programs. Each has a section in Optimizations with its before and after:

change boards what it did to the benchmark it aimed at
1 the H7 port is built for its FPU H7 floating-point work in 0.06 to 0.17 of its time
2 the runtime's own mutexes and condition variables, in place of pthread's all queue_2000 to 0.19, 0.30 and 0.45 of its time
3 queue nodes from a cache, not malloc all queue_2000 to 0.50 and 0.22 of its time on the ESP32s, and no change on the H7
4 a worker's copy of the globals in internal RAM on the S3, and a word-wide memset on the H7 S3, H7 a spawn from 1,402 to 212 µs on the S3 and 316 to 102 on the H7
5 cheaper waits and wakes in those locks: a woken waiter skips the critical section, and on the ESP32s it sleeps on a semaphore all pingpong to 1.67, 1.19 and 1.12 times C
6 Goose's in-order sums run one term at a time all matmul_f32 from 3.0 and 3.5 times C to 1.31 and 1.37
7 the H7 keeps the time as it is asked for: one 32-bit division a read H7 clock_1000 to 0.17 of its time
8 timer_every() on a hardware timer, and a held-up wake moves the worker in the way ESP32s a tick reaches the program in 12 and 14 µs, against 23 and 28
9 a worker's globals copy holds only what it uses, --worker-reserve, and 8 KB held back on a WROOM without WiFi all a worker of the suite holds 33,212 bytes, against 72,044
Before and after optimization: time ÷ C'sGrey: MicroGoose at the perf-baseline tag. Orange: now. Log scale; the dashed line is C (C with FPU on the H743).perf-baselineperf-baselinenownowbefore → now0.5×same as C2×5×10×20×Queue, 2,000 messagesS3Queue, 2,000 messages, S3, perf-baseline: 13.0×Queue, 2,000 messages, S3, now: 0.81×13.0× → 0.81×WROOM-32Queue, 2,000 messages, WROOM-32, perf-baseline: 18.4×Queue, 2,000 messages, WROOM-32, now: 0.61×18.4× → 0.61×H743Queue, 2,000 messages, H743, perf-baseline: 5.24×Queue, 2,000 messages, H743, now: 1.35×5.24× → 1.35×Queue round tripS3Queue round trip, S3, perf-baseline: 4.73×Queue round trip, S3, now: 1.67×4.73× → 1.67×WROOM-32Queue round trip, WROOM-32, perf-baseline: 4.57×Queue round trip, WROOM-32, now: 1.19×4.57× → 1.19×H743Queue round trip, H743, perf-baseline: 2.00×Queue round trip, H743, now: 1.00×2.00× → 1.00×Spawn and join a workerS3Spawn and join a worker, S3, perf-baseline: 18.1×Spawn and join a worker, S3, now: 1.71×18.1× → 1.71×WROOM-32Spawn and join a worker, WROOM-32, perf-baseline: 3.12×Spawn and join a worker, WROOM-32, now: 1.60×3.12× → 1.60×H743Spawn and join a worker, H743, perf-baseline: 4.84×Spawn and join a worker, H743, now: 0.66×4.84× → 0.66×Matrix multiply, f32S3Matrix multiply, f32, S3, perf-baseline: 3.00×Matrix multiply, f32, S3, now: 1.31×3.00× → 1.31×WROOM-32Matrix multiply, f32, WROOM-32, perf-baseline: 3.47×Matrix multiply, f32, WROOM-32, now: 1.37×3.47× → 1.37×H743Matrix multiply, f32, H743, perf-baseline: 9.28×Matrix multiply, f32, H743, now: 1.01×9.28× → 1.01×Mandelbrot, f64H743Mandelbrot, f64, H743, perf-baseline: 10.8×Mandelbrot, f64, H743, now: 1.04×10.8× → 1.04×Read the clock 1,000 timesH743Read the clock 1,000 times, H743, perf-baseline: 3.07×Read the clock 1,000 times, H743, now: 0.50×3.07× → 0.50×Timer wake, idleS3Timer wake, idle, S3, perf-baseline: 1.62×Timer wake, idle, S3, now: 1.25×1.62× → 1.25×WROOM-32Timer wake, idle, WROOM-32, perf-baseline: 1.70×Timer wake, idle, WROOM-32, now: 1.20×1.70× → 1.20×Source: bench/results, drawn by bench/charts.py. What each change did is in Optimizations.

After

Medians in µs. A ratio under 1 is faster. "Now: boots' medians" is the lowest and highest of the five boots' own medians.

ESP32-S3

benchmark baseline (µs) now (µs) now ÷ baseline now: boots' medians c (µs) baseline ÷ c now ÷ c
clock_1000 855 855 1.000 855 855 1.00 1.00
crc32 3,567 3,567 1.000 3,567 3,977 0.90 0.90
heapsort 4,815 4,659 0.968 4,659 2,420 1.99 1.93
mandel_f64 166,166 166,167 1.000 166,166 to 166,167 165,847 1.00 1.00
mandel_f32 7,451 7,452 1.000 7,451 to 7,452 7,251 1.03 1.03
matmul_f32 3,874 1,688 0.436 1,688 to 1,689 1,292 3.00 1.31
queue_2000 44,967 2,785 0.062 2,740 to 2,984 3,456 13.01 0.81
pingpong 71 25 0.352 25 15 4.73 1.67
spawn_wait 1,465 138.5 0.095 138.5 to 142 81 18.09 1.71
scale_main 631,150 630,229 0.999 630,227 to 630,229 610,570 1.03 1.03
scale_1w 629,067 625,860 0.995 625,854 to 625,861 611,554 1.03 1.02
scale_2w 326,987 321,767 0.984 321,761 to 321,777 314,997 1.04 1.02
scale_4w 330,801 322,929 0.976 322,012 to 322,964 315,937 1.05 1.02
timer_idle_gap 1,000 1,000 1.000 1,000 1,000 1.00 1.00
timer_idle_wake 13 10 0.769 9 to 10 8 1.62 1.25
timer_busy_gap 1,000 1,000 1.000 1,000 1,000 1.00 1.00
timer_busy_wake 147 10 0.068 10 1,385.5 0.11 0.01
pin_idle_gap — 1,003 — 1,003 1,003 — 1.00
pin_idle_wake — 10 — 10 8 — 1.25
pin_busy_gap — 1,003 — 1,003 1,003 — 1.00
pin_busy_wake — 11 — 11 469.5 — 0.02
fault_contained 1,693 257 0.152 243.5 to 275 — — —

ESP32 WROOM-32

benchmark baseline (µs) now (µs) now, 4 KB worker stacks (µs) now ÷ baseline now: boots' medians c (µs) baseline ÷ c now ÷ c 4 KB ÷ c
clock_1000 584 584 584 1.000 584 584 1.00 1.00 1.00
crc32 3,702 3,702 3,702 1.000 3,701 to 3,702 4,180 0.89 0.89 0.89
heapsort 5,614 5,541 5,541 0.987 5,541 to 5,544 2,857 1.96 1.94 1.94
mandel_f64 171,324 171,317 171,317 1.000 171,316 to 171,318 170,700 1.00 1.00 1.00
mandel_f32 8,432 8,425 8,425 0.999 8,425 7,791 1.08 1.08 1.08
matmul_f32 4,976 1,961 1,961 0.394 1,961 1,432 3.47 1.37 1.37
queue_2000 87,104 2,862 2,814 0.033 2,729 to 2,967 4,726 18.43 0.61 0.60
pingpong 96 25 25 0.260 25 21 4.57 1.19 1.19
spawn_wait 306 157 156.5 0.513 156 to 157 98 3.12 1.60 1.60
scale_main — 647,585 647,585 — 647,585 to 647,586 628,740 — 1.03 1.03
scale_1w 653,198 652,909 652,907 1.000 652,897 to 652,938 626,081 1.04 1.04 1.04
scale_2w — 355,144 355,159 — 355,105 to 355,186 344,006 — 1.03 1.03
scale_4w — 355,646 355,532 — 355,484 to 355,829 344,339 — 1.03 1.03
timer_idle_gap 1,000 † 1,000 1,000 1.000 1,000 1,000 1.00 1.00 1.00
timer_idle_wake 17 † 12 12 0.706 11 to 14 10 1.70 1.20 1.20
timer_busy_gap 1,000 † 1,000 1,000 1.000 1,000 1,000 1.00 1.00 1.00
timer_busy_wake 17 † 12 11 0.706 11 to 12 1,356.5 0.01 0.01 0.01
pin_idle_gap — 1,002 1,002 — 1,002 1,002 — 1.00 1.00
pin_idle_wake — 12 12 — 12 10 — 1.20 1.20
pin_busy_gap — 1,002 1,002 — 1,002 1,002 — 1.00 1.00
pin_busy_wake — 12 12 — 12 598 — 0.02 0.02
fault_contained 527 † 249 256 0.472 249 to 250 — — — —

† measured in a run of that group alone, on fresh boots, because the whole run didn't get that far, or was made before the group was added. — the run stopped before this benchmark, or was made before it was added.

STM32H743

benchmark baseline (µs) now (µs) now ÷ baseline now: boots' medians c-fpu (µs) baseline ÷ c-fpu now ÷ c-fpu
clock_1000 753 122 0.162 122 245 3.07 0.50
crc32 1,723 1,682 0.976 1,682 2,425 0.71 0.69
heapsort 1,776 1,748 0.984 1,748 826 2.15 2.12
mandel_f64 75,450 7,251 0.096 7,251 6,961 10.84 1.04
mandel_f32 53,074 3,391 0.064 3,391 3,683 14.41 0.92
matmul_f32 5,633 614 0.109 614 607 9.28 1.01
queue_2000 9,648 2,492 0.258 2,492 1,841 5.24 1.35
pingpong 16 8 0.500 8 8 2.00 1.00
spawn_wait 455 62 0.136 62 94 4.84 0.66
scale_main 279,900 26,480 0.095 26,479 to 26,480 25,544 10.96 1.04
scale_1w 280,249 26,550 0.095 26,550 25,639 10.93 1.04
scale_2w 280,808 26,625 0.095 26,625 25,745 10.91 1.03
scale_4w 281,735 26,750 0.095 26,750 to 26,751 25,932 10.86 1.03
timer_idle_gap 1,000 1,000 1.000 1,000 1,000 1.00 1.00
timer_idle_wake 1 1 1.000 0 to 1 2 0.50 0.50
timer_busy_gap 1,000 1,000 1.000 1,000 1,000 1.00 1.00
timer_busy_wake 4 5 1.250 5 514 0.01 0.01
pin_idle_gap — 1,003 — 1,003 — — —
pin_idle_wake — 1 — 1 — — —
pin_busy_gap — 1,003 — 1,003 — — —
pin_busy_wake — 5 — 5 — — —
fault_contained 478 82 0.172 82 — — —

What the tables show:

  • Nothing is slower than at the baseline by more than 1 µs. Three medians are 1 µs higher, on benchmarks no change aimed at: mandel_f64 and mandel_f32 on the S3, at 166,167 against 166,166 and 7,452 against 7,451, and the timer wake beside a busy worker on the H7, at 5 against 4 since section 13.
  • Ahead of C now: queue_2000 on the ESP32s (0.81 and 0.60), crc32 (0.69 to 0.90), and on the H7 clock_1000 (0.50), spawn_wait (0.66) and mandel_f32 (0.92). The timer wake beside a busy worker takes 10, 11 and 5 µs, against C's 1,386, 1,357 and 514.
  • Level with C, within 5%: mandel_f64, mandel_f32 on the S3, the scaling benchmarks, matmul_f32 and pingpong on the H7, and clock_1000 on the ESP32s.
  • Behind C: heapsort (1.93, 1.94, 2.12), spawn_wait on the ESP32s (1.71 and 1.60), queue_2000 on the H7 (1.35), pingpong on the ESP32s (1.67 and 1.19), matmul_f32 on the ESP32s (1.31 and 1.37), the idle timer wake on the ESP32s (1.25 and 1.20) and mandel_f32 on the WROOM (1.08).
  • Contained faults, which C can't do: 257, 256 and 82 µs to spawn a worker, have it fault and learn why, against 1,693, 527 and 478.

Tails, for the benchmarks where the tail is the point:

ESP32-S3

benchmark baseline: median, p99, max (µs) now: median, p99, max (µs) c: median, p99, max (µs)
pingpong 71, 83, 84 25, 28, 36 15, 22, 23
spawn_wait 1,465, 1,483, 1,512 138.5, 162, 162 81, 86, 86
timer_idle_wake 13, 13, 13 10, 10, 10 8, 8, 8
timer_busy_wake 147, 1,554, 1,554 10, 10, 10 1,385.5, 1,884, 1,885
pin_idle_wake — 10, 13, 15 8, 11, 13
pin_busy_wake — 11, 13, 985 469.5, 1,970, 1,989
fault_contained 1,693, 1,961, 1,961 257, 653, 661 —

ESP32 WROOM-32 (now: the run with 4 KB worker stacks)

benchmark baseline: median, p99, max (µs) now: median, p99, max (µs) c: median, p99, max (µs)
pingpong 96, 113, 152 25, 36, 47 21, 34, 42
spawn_wait 306, 322, 324 156.5, 165, 178 98, 103, 103
timer_idle_wake 17, 17, 17 12, 12, 12 10, 10, 10
timer_busy_wake 17, 17, 18 11, 12, 13 1,356.5, 1,856, 1,857
pin_idle_wake — 12, 15, 16 10, 12, 14
pin_busy_wake — 12, 15, 933 598, 1,974, 1,986
fault_contained 527, 1,563, 1,564 256, 852, 853 —

STM32H743

benchmark baseline: median, p99, max (µs) now: median, p99, max (µs) c-fpu: median, p99, max (µs)
pingpong 16, 17, 21 8, 9, 12 8, 9, 9
spawn_wait 455, 461, 462 62, 64, 64 94, 95, 95
timer_idle_wake 1, 1, 1 1, 1, 1 2, 3, 3
timer_busy_wake 4, 4, 5 5, 5, 5 514, 717, 717
pin_idle_wake — 1, 1, 2 —
pin_busy_wake — 5, 5, 6 —
fault_contained 478, 485, 485 82, 89, 90 —
  • Spread between boots. Most benchmarks' boots agree within 0.2%. On the S3 queue_2000's differ by up to 9% (2,740 to 2,984 µs) and fault_contained's by 13% (243.5 to 275); on the WROOM with 4 KB data stacks by 6% and 10% (2,784 to 2,944, and 256 to 281.5). The slowest repetition of queue_2000 is several times its median on the ESP32s (Results).
  • A spawn's slowest on the WROOM took 178 µs in the 4 KB run, against a median of 156.5. In the run as built one spawn took 2,988 and one 2,087, in two of its five boots, and main's run before section 13 had three of 2,146 to 3,149. Section 12 found such spawns in 4 of 20 boots after its change and in none of 15 before it, without a cause.
  • fault_contained's slowest takes 2.6 and 3.3 times its median on the ESP32s: 661 against 257 µs on the S3 and 853 against 256 on the WROOM.

Against the other implementations

Each cell is that implementation's median as a multiple of MicroGoose's now: over 1, it takes longer than MicroGoose. MicroGoose on the WROOM is the run with 4 KB worker stacks.

ESP32-S3

benchmark MicroGoose (µs) c ÷ MicroGoose rust ÷ MicroGoose tinygo ÷ MicroGoose tinygo-cores ÷ MicroGoose micropython-native ÷ MicroGoose micropython ÷ MicroGoose
clock_1000 855 1.00 0.92 0.86 1.02 4.41 4.41
crc32 3,567 1.11 0.99 0.25 0.25 469 579
heapsort 4,659 0.52 0.79 0.62 0.62 89.4 127
mandel_f64 166,167 1.00 1.00 1.00 1.01 11.7 13.3
mandel_f32 7,452 0.97 1.15 1.17 1.17 260 297
matmul_f32 1,688 0.77 1.98 1.23 1.15 359 416
queue_2000 2,785 1.24 0.70 1.76 4.30 98.5 98.9
pingpong 25 0.60 0.24 0.40 0.60 40.9 41.2
spawn_wait 138.5 0.58 0.03 0.36 0.40 1.35 1.35
scale_main 630,229 0.97 0.98 0.97 0.98 8.96 10.5
scale_1w 625,860 0.98 0.98 0.98 0.99 8.97 10.5
scale_2w 321,767 0.98 0.97 1.91 0.98 17.5 20.5
scale_4w 322,929 0.98 0.97 1.91 0.98 17.4 20.5
timer_idle_gap 1,000 1.00 1.00 1.00 1.00 1.00 1.00
timer_idle_wake 10 0.80 0.80 9,147 1.30 49.1 49.7
timer_busy_gap 1,000 1.00 1.00 1.00 — 1.00 1.00
timer_busy_wake 10 139 26.1 6.80 — 795 805
pin_idle_gap 1,003 1.00 — — — — —
pin_idle_wake 10 0.80 — — — — —
pin_busy_gap 1,003 1.00 — — — — —
pin_busy_wake 11 42.7 — — — — —
fault_contained 257 — — — — — —

ESP32 WROOM-32

benchmark MicroGoose (µs) c ÷ MicroGoose rust ÷ MicroGoose tinygo ÷ MicroGoose micropython-native ÷ MicroGoose micropython ÷ MicroGoose
clock_1000 584 1.00 0.98 1.80 10.3 10.3
crc32 3,702 1.13 1.01 0.50 725 914
heapsort 5,541 0.52 0.76 0.88 208 203
mandel_f64 171,317 1.00 1.00 1.49 19.0 21.6
mandel_f32 8,425 0.92 1.17 1.78 387 439
matmul_f32 1,961 0.73 1.84 1.59 627 423
queue_2000 2,814 1.68 0.82 2.98 325 322
pingpong 25 0.84 0.28 0.68 94.0 101
spawn_wait 156.5 0.63 0.03 0.53 6.16 6.24
scale_main 647,585 0.97 0.97 1.46 14.4 16.9
scale_1w 652,907 0.96 0.97 1.44 14.2 16.7
scale_2w 355,159 0.97 0.97 2.65 26.1 30.7
scale_4w 355,532 0.97 0.97 2.65 26.1 30.7
timer_idle_gap 1,000 1.00 1.00 1.00 1.01 1.00
timer_idle_wake 12 0.83 0.92 7,622 114 112
timer_busy_gap 1,000 1.00 1.00 1.00 1.00 1.00
timer_busy_wake 11 123 26.2 14.2 719 717
pin_idle_gap 1,002 1.00 — — — —
pin_idle_wake 12 0.83 — — — —
pin_busy_gap 1,002 1.00 — — — —
pin_busy_wake 12 49.8 — — — —
fault_contained 256 — — — — —

STM32H743

benchmark MicroGoose (µs) c-fpu ÷ MicroGoose rust ÷ MicroGoose tinygo ÷ MicroGoose micropython-native ÷ MicroGoose micropython ÷ MicroGoose
clock_1000 122 2.01 0.33 8.23 12.2 12.5
crc32 1,682 1.44 0.16 0.15 398 472
heapsort 1,748 0.47 0.55 0.65 106 137
mandel_f64 7,251 0.96 0.97 18.3 76.4 94.1
mandel_f32 3,391 1.09 1.14 27.5 163 201
matmul_f32 614 0.99 1.02 16.8 249 311
queue_2000 2,492 0.74 0.22 0.55 39.6 40.1
pingpong 8 1.00 0.25 0.38 79.0 82.4
spawn_wait 62 1.52 0.02 0.29 1.29 1.26
scale_main 26,480 0.96 0.97 18.9 76.6 94.2
scale_1w 26,550 0.97 0.89 18.8 76.5 94.4
scale_2w 26,625 0.97 0.89 18.7 76.3 94.2
scale_4w 26,750 0.97 0.88 18.6 76.0 93.7
timer_idle_gap 1,000 1.00 1.00 1.00 1.00 1.00
timer_idle_wake 1 2.00 1.00 4.00 171 169
timer_busy_gap 1,000 1.00 1.00 1.00 1.00 1.00
timer_busy_wake 5 103 6.40 3.00 883 889
pin_idle_gap 1,003 — — — — —
pin_idle_wake 1 — — — — —
pin_busy_gap 1,003 — — — — —
pin_busy_wake 5 — — — — —
fault_contained 82 — — — — —
ESP32-S3: time ÷ C's, by languageMedians, log scale; the dashed line is C. Same algorithms, clocks and board. MicroPython 1.29 bytecode.CRC-32HeapsortMandelbrot, f64Mandelbrot, f32Matrix multiply, f32Queue, 2,000 messagesQueue round tripSpawn and join a workerMicroGoose0.11101001kMicroGoose, CRC-32: 0.90× C's timeMicroGoose, Heapsort: 1.93× C's timeMicroGoose, Mandelbrot, f64: 1.00× C's timeMicroGoose, Mandelbrot, f32: 1.03× C's timeMicroGoose, Matrix multiply, f32: 1.31× C's timeMicroGoose, Queue, 2,000 messages: 0.81× C's timeMicroGoose, Queue round trip: 1.67× C's timeMicroGoose, Spawn and join a worker: 1.71× C's timeRust (Embassy)0.11101001kRust (Embassy), CRC-32: 0.89× C's timeRust (Embassy), Heapsort: 1.51× C's timeRust (Embassy), Mandelbrot, f64: 1.01× C's timeRust (Embassy), Mandelbrot, f32: 1.18× C's timeRust (Embassy), Matrix multiply, f32: 2.58× C's timeRust (Embassy), Queue, 2,000 messages: 0.57× C's timeRust (Embassy), Queue round trip: 0.40× C's timeRust (Embassy), Spawn and join a worker: 0.05× C's timeTinyGo0.11101001kTinyGo, CRC-32: 0.22× C's timeTinyGo, Heapsort: 1.19× C's timeTinyGo, Mandelbrot, f64: 1.00× C's timeTinyGo, Mandelbrot, f32: 1.21× C's timeTinyGo, Matrix multiply, f32: 1.61× C's timeTinyGo, Queue, 2,000 messages: 1.42× C's timeTinyGo, Queue round trip: 0.67× C's timeTinyGo, Spawn and join a worker: 0.62× C's timeMicroPython0.11101001kMicroPython, CRC-32: 519× C's timeMicroPython, Heapsort: 245× C's timeMicroPython, Mandelbrot, f64: 13.3× C's timeMicroPython, Mandelbrot, f32: 305× C's timeMicroPython, Matrix multiply, f32: 543× C's timeMicroPython, Queue, 2,000 messages: 79.7× C's timeMicroPython, Queue round trip: 68.6× C's timeMicroPython, Spawn and join a worker: 2.31× C's timeTimes C's time. Source: bench/results, drawn by bench/charts.py.
  • Rust (Embassy). Its tasks are slots in a static pool and its channels are static rings, on a cooperative executor with no RTOS. It starts a task in 1 to 4 µs, where MicroGoose's spawn of a preemptible thread takes 62 to 156.5. A round trip takes a quarter of MicroGoose's time, and queue_2000 0.22 to 0.82 of it. MicroGoose is ahead on matmul_f32 on the ESP32s (Rust takes 1.8 and 2.0 times as long) and on mandel_f32 (1.14 to 1.17). Rust's CRC-32 on the H7 takes 0.16 of MicroGoose's time, because LLVM turns the loop into a table lookup there. Beside a busy worker Rust's timer waits for the worker to yield: 8 to 26 times MicroGoose's wake. Findings has the rest.
  • TinyGo. It is faster at crc32 everywhere (0.15 to 0.50 of MicroGoose's time), at heapsort, at starting a goroutine and at the round trip. Its queue_2000 takes 1.8 and 3.0 times MicroGoose's on the ESP32s and 0.55 on the H7. Three things in its runtime decide the rest. It runs the WROOM at 160 MHz, so its floating-point work there takes 1.4 to 1.8 times MicroGoose's. Its H7 target uses software floating point, 17 to 28 times MicroGoose's time. Its default scheduler uses one core, so two workers take 1.9 times as long on the S3. With its multicore scheduler (tinygo-cores) it scales as MicroGoose does, takes 4.3 times as long on queue_2000, and its timer gets no tick beside a busy worker. Its idle timer wake on the ESP32s takes 91 ms, a bug in TinyGo (Findings).
  • MicroPython. Its compute takes 9 to 900 times MicroGoose's time, and its native emitter gains little. Starting an asyncio task is near MicroGoose's spawn on the S3 and the H7 (1.4 and 1.3 times). It has no multicore: every task runs on one core. On the ESP32s its floats are single precision, and it runs the WROOM at 160 MHz (Findings).
  • C. The table above this one is the comparison. Where C is behind MicroGoose by a wide margin, the timer wake beside a busy worker, it is C at equal priorities.

Pin edges

Added after the rest, on 2026-12-04, in Goose and C. A pin puts out a 997 Hz wave and watches its own rising edges, so no wire or second task makes them. pin_idle_wake and pin_busy_wake are the time from an edge's timestamp, taken in its interrupt, to the program having the edge. The rows are in the tables above, and Methodology has the definitions.

  • With nothing else running an edge reaches the program in 10 µs on the S3 and 12 on the WROOM, against C's 8 and 10: 1.25 and 1.20 times C, the same 2 µs as the idle timer wake. On the H7 it takes 1 µs.
  • Beside a busy worker it takes 11, 12 and 5 µs. C at equal priorities takes a median of 469.5 µs on the S3 and 598 on the WROOM, with a slowest of 2 ms: its task waits for the time slice, as with the timer. A C programmer would raise that task's priority.
  • The slowest edges. Beside a busy worker the slowest of 5,000 took 985 µs on the S3 and 933 on the WROOM in the latest runs: one edge in three of the S3's five boots, 973 to 985 µs, and in one boot of each WROOM run, 933 µs with 4 KB data stacks and 942 as built. Main's runs just before section 13 had them too, 992 and 1,001 µs in two of the S3's boots and 211 in one of the WROOM's, and the runs before those (181987f) none on the S3 and 201 and 214 µs on the WROOM with 4 KB data stacks. In the first pin run on the S3 (2026-12-04) one edge in each boot was late, 916 to 918 µs: an event that finds the worker on the program's core waits for the scheduler's tick, and the port then moves the worker to the idle core, so the ones after it aren't late (section 8).
  • Not measured: C on the H7. The debug probe stopped answering after the run's first boot, whose 1,000 edges are in no table, and C's pin run hasn't been made there since. Rust, TinyGo and MicroPython have no pin benchmark. And the time from the edge itself to its interrupt isn't in these figures: the timestamp is taken inside the interrupt.

Memory and size

Bytes, from each run's build log and its first boot:

ESP32-S3 ESP32 WROOM-32 ESP32 WROVER-E STM32H743 Pico 2 W
image (flash), MicroGoose at the baseline 251,243 231,518 — 60,292 —
image (flash), MicroGoose now 283,027 266,366 269,218 63,536 85,340
image (flash), C 186,919 172,678 184,622 18,492 48,972
image (flash), Rust 102,397 87,685 — 46,308 —
image (flash), TinyGo 82,876 85,400 — 83,400 —
image (flash), MicroPython 1,727,627 1,735,567 — 320,708 —
static RAM, MicroGoose at the baseline 59,792 57,220 — 53,572 —
static RAM, MicroGoose now 62,784 59,932 60,212 54,584 58,884
static RAM, C 77,616 75,284 75,512 63,216 70,008
free heap when the suite starts, at the baseline 8,605,447 130,212 — 362,900 —
free heap when the suite starts, now 8,601,975 129,100 4,320,147 361,792 341,340
  • The image grew by 31,784 bytes on the S3, 34,848 on the WROOM and 3,244 on the H7 since the baseline. By the ninth change it was 10,364 and 11,164 on the ESP32s, 8 KB of it ESP-IDF's timer driver (section 8), and 2,964 smaller on the H7. The pin benchmarks and sections 10 and 11 added 20,800 bytes on the S3 and 23,092 on the WROOM (c704e27 to 6aa1273, both with Goose v2026.4). On the S3, Goose v2026.5 then took 996 bytes off, the commits after it up to main added 1,636, and section 12 took 168 off (104 and 212 on the H7 and the WROOM). Section 13 added 148, 136 and 240, and 192 on the Pico 2 W. MicroGoose's image is the largest of the compiled ones on the ESP32s, where it and C carry ESP-IDF and Rust and TinyGo don't.
  • Static RAM grew by 1,012 to 2,992 bytes, 2,580 and 2,260 of it on the ESP32s with the pin benchmarks and sections 10 and 11, and 340 on the H7 and the Pico 2 W with section 13's chunk table. C's is larger because it keeps its sample buffers there.
  • The suite's memory is its data stacks: six of 16 KB for the main program, reserved from the heap before main. The whole suite writes 24,762 of those 98,688 bytes.
  • A worker held 72,044 bytes before section 9 and wrote about 1 KB of it. After section 9 it held 33,212 as built and 20,924 with --worker-reserve 4K: a 16 KB native stack and one data stack, which no worker of the suite writes to. With section 10's data stacks and Goose v2026.5 a worker with a 4 KB data stack holds 21,240, and 8,952 with --worker-stack 4K beside it (section 10).
  • The source. Lines that hold code in each implementation's suite, and in what each needed written for the boards beside it (clock, timer, console, start-up):

    the suite's workloads for the ESP32s for the H7 for the Pico 2 W
    MicroGoose 474 none none none
    C 490 103 310 178
    Rust 510 81 171 none
    TinyGo 488 99 156 none
    MicroPython 360 none 96 none

    MicroGoose's suite is one file for all four boards: its hardware calls are MicroGoose's own library. Line counts say little about difficulty. They are here because Methodology listed them as still to come.

Correctness defects found while measuring

These were investigated apart from the performance work, each with a test that shows it. Findings has each one's cause, fix and test:

  1. Contained aborts keep memory until a wait asks for their message. This is in the Goose runtime and isn't fixed here.
  2. Finished workers' memory came back late on the H7. Fixed.
  3. A WROOM spawn failed in some boots, when a finished worker's stack hadn't been freed yet. A wait was added. The failure hasn't recurred, and the runs can't show that the wait is why.
  4. A refused data stack doesn't shrink later ones. On MicroGoose this can't happen.
  5. realloc read past the block it grew on the H7. Fixed.
  6. Timed queue waits stopped working once the wall clock was set, on the ESP32s. Fixed by the runtime's own locks.
  7. Timed waits could end before their deadline on the H7. Fixed.
  8. event_wait could wake a tick late on the H7. Fixed.
  9. delay_ms could return early on the ESP32s. Fixed.
  10. A spawn could fail at its native stack while finished workers' stacks were still to be freed, on a WROOM with less memory held back. Fixed (section 9).
  11. A contained abort could end the program on the Pico 2 W, with a FreeRTOS assertion over the Pico SDK's lock round malloc. Fixed.
  12. microgoose monitor couldn't restart a running program on the Pico 2 W: the port's watchdog feeding cancelled the restart. Fixed.

What the work cost

Every section of Optimizations lists what moved the wrong way. What is still true now:

  • Flash: 10 to 11 KB more on the ESP32s.
  • Hardware timers: timer_every() takes the chip's four general-purpose timers, so C code built in with --include can use only the ones a program leaves. Each tick's interrupt takes about 9 µs on the S3 and 10 on the WROOM, on the core of the thread that started the timer.
  • Queue nodes: up to 4 KB of them stay allocated once a program has used them.
  • Finished workers on the S3: a loop of spawns holds five finished workers' stacks at once, 82,660 bytes, until the idle task frees them. Before section 9 it held one.
  • Changes to the generated code: five of the nine sections rewrite part of what the Goose compiler emits, the program's C or the runtime's, in microgoose/core.py: the runtime's locks and queue nodes, a worker's globals, the size of a worker's stacks and the shape of in-order sums. Each stops the build, or falls back, when the compiler's output isn't in the shape it expects. They have to be checked against each new Goose release.
  • Not explained. Several results moved by a few percent on code the change at hand didn't touch, and a build that only moves code can move a spawn on the WROOM by 30 µs. Each section says where. The cause isn't found. A hypothesis, not tested: what the ESP32's flash cache holds.

Where MicroGoose stands

Strengths, as measured.

  • Floating-point loops with few array accesses run at C's speed, within 8%, on all three boards.
  • A timer's tick reaches a waiting program in 10 to 12 µs on the ESP32s and 1 to 4 on the H7, beside one busy worker as with nothing else running. No other implementation here keeps that beside a busy worker.
  • A stream of messages from a worker is faster than through a FreeRTOS queue on the ESP32s, between threads that can be preempted.
  • Two workers take 0.515 of one worker's time on the S3, as C's tasks do.
  • A fault in a worker is contained and reported, at the cost of a spawn. No other implementation has a counterpart in the suite.

Limits, as measured.

  • heapsort is at twice C's time. In C, 64-bit indexes alone take 1.5 to 1.8 times as long, and MicroGoose can't narrow Goose's i64 (section 6).
  • A spawn on the ESP32s is twice C's and 38 to 53 times Embassy's. An empty pthread, started and waited for, is 81 of its 153 µs on the S3.
  • On the H7, queue_2000 is 2.3 times C: most of its nodes still come from malloc there.
  • Every data stack of the main program has one size, and a board commits all of it. On the WROOM the suite's four workers fit only with --worker-reserve 4K.
  • A program has no report of how much of a stack it used. The figures here come from an experiment patch.
  • With a worker computing on each core, an event waits for the scheduler's tick, as in C.

Remaining opportunities, largest measured gap first:

  1. heapsort: 32-bit indexes where the compiler can prove them, which is a change to the Goose compiler.
  2. Spawning on the ESP32s: the 76 to 92 µs from pthread_create until the worker runs (section 4).
  3. queue_2000 on the H7: the node cache's reach there.
  4. The round trip on the S3: two wakes across cores, and the two speeds section 5 found.
  5. matmul_f32 on the ESP32s: C fuses each multiply and add, and Goose's rounding rules don't.
  6. Memory: a size for each of the main program's stacks, a report of what each stack used, and the 64 KB a networked WROOM still holds back.
  7. The idle timer wake on the ESP32s: 2 µs behind C's.

Since the report

Five changes were made on 2026-12-04 and 05. The tables above moved to Goose v2026.5 with the fourth, and are the fifth's runs now. The figures quoted beside the tables are from those runs; the rest of the report stands as it was written.

  • Pin edges are measured, in Goose and C (Pin edges).
  • A program can see what its stacks use, and size a worker's native stack (section 10). --stack-report prints how far each data stack was written and how much of each native stack was used, which was the fifth limit above. --worker-stack sets a worker's native stack, 16 KB until now: on the WROOM a waiting worker with 4 KB data stacks holds 8.8 KB with --worker-stack 4K against 21 KB, and 19 fit where 8 did. A worker's data stack takes 192 bytes more than it did at 4 KB, so that the heap can give its memory to the next one.
  • A thread can run ahead of the workers (section 11). The last limit above was that with a worker computing on each core an event waits for the scheduler's tick, as in C. task_priority(1) in the thread that waits is what a C programmer does about it, and a Goose program can now do it too: a tick or an edge then reaches the program in 10 to 12 µs on the ESP32s with both cores busy, 17 at the slowest, against a median of 0.8 to 1.1 ms. C with its task raised the same way takes 8 to 10 µs.
  • The suite was run again on both ESP32s before and after these two, at priority 0 as in the tables above. Nothing is slower. A spawn takes 0.79 of its time on the S3 and 0.90 on the WROOM, because a worker's data stack no longer has the heap walked for it. Those runs are in bench/results/before/ and bench/results/dev/, not in the tables here.
  • Main moved to Goose v2026.5 the same day. On the merged code the stress tests and the conformance samples pass again. The compiler now writes matmul's sum in a shape section 6's change didn't cover, and for a day matmul_f32 took 2.3 to 2.5 times its time on the ESP32s (section 10 has the account).
  • Sums in blocks alone run one term at a time again (section 12). matmul_f32 is back at 1,689, 1,961 and 614 µs, what it took with v2026.4, and the tables above are that change's runs, made with v2026.5 on all three boards.
  • What those runs changed in the tables, besides matmul_f32: a spawn is 1.69 and 1.59 times C on the ESP32s, against 1.89 and 2.17 (section 10's data stacks); the WROOM runs the whole suite as built, but for one boot in 15; fault_contained takes 231, 309 and 85 µs, against 353.5, 328 and 87; and the ESP32 images are 21 and 24 KB larger than in the runs before, with 2.4 KB less free heap at the start on the WROOM. Every result still matches C's.
  • The H7 answers on its debug probe again (2026-12-05), and the suite ran there for sections 12 and 13. Sections 10 and 11's own tests and C's pin run have only run in the emulator there so far.
  • Queues keep nodes for a backlog on one core (section 13). With one core the worker that sends keeps the CPU, most of queue_2000's messages wait at once, and on the H7 and the Pico 2 W most of their nodes came from malloc: the third limit and the third opportunity above. The cache now grows there in chunks that double, up to a quarter of the free heap. queue_2000 takes 1.35 times C's time on the H7, against 2.28, and 0.87 of it on the Pico 2 W, against 1.33. The chunks a backlog took are kept until reset: 44,928 to 61,204 bytes in the suite. The ESP32s keep section 3's cache, 4 KB: a bigger one made queue_2000 1.4% faster on the S3 and 0.7% on the WROOM, too little for 20 KB of internal RAM. Every result still matches C's.
  • The Pico 2 W (RP2350, 150 MHz) ran the suite in MicroGoose and C, 5 boots each; MicroGoose's run is section 13's (Results). It has no baseline and no other language, and the size and source tables above have its column. Every MicroGoose result matches C's.
    • Behind C on the rest of the compute: heapsort 1.52 times, crc32 1.17 (ahead of C on the other three boards), matmul_f32 1.12, mandel_f32 1.10 and mandel_f64 1.02. A spawn takes 1.01 of C's time, the round trip 1.05, and the scaling runs 1.01 and 1.02. crc32 is behind because Goose counts its inner loop in a 64-bit integer, and GCC then counts up and compares, a cycle more a bit. A fix belongs in the Goose compiler or in MicroGoose's rewrites of its C (section 13 has the probe).
    • queue_2000 ahead, 0.87 of C's time with section 13's cache. In the run before it was 1.33 times C's, and its samples spread from 8,974 to 10,654 µs, against C's 6,935 to 6,948; now they spread from 5,993 to 6,062.
    • Ahead on waking: a timer tick reaches the program in 3 µs against C's 5, and a pin edge in 4 against 5. Beside a busy worker, 12 and 13 µs, where C at equal priorities waits for the time slice: medians of 753 and 499.5 µs. Seventeen of MicroGoose's 5,000 edges beside the busy worker, two to four a boot, took 991 to 998 µs: eight, one or two a boot, in the run before.
    • Size: an 85,340-byte image against C's 48,972, and less static RAM than C, 58,884 bytes against 70,008. The suite starts with 341,340 bytes of heap free.
    • Two defects in the port came up on the way, items 11 and 12 above, and both are fixed: the published runs are with the fixes.
  • The WROVER-E (a classic ESP32 with 8 MB of PSRAM, 4 MB of it mapped) ran the suite in MicroGoose and C, 5 boots each: MicroGoose at e53e7d1, with section 16's change, and C on main at e38087e (Results). It runs the WROOM-32's images, and it has no baseline and no other language. Every MicroGoose result matches C's.
    • The WROOM-32's speed on compute and scaling: MicroGoose's medians there are within 0.9% of the WROOM-32's. Against C: mandel_f64 1.00, crc32 0.89, queue_2000 0.64, matmul_f32 1.37, heapsort 1.92 and scale_4w 1.03.
    • A spawn takes 84 µs, 0.85 of C's 99, where the WROOM-32's takes 157: on a board with PSRAM a finished worker's thread waits for the next spawn (section 15).
    • The suite runs to its end in every boot, as built and with --worker-reserve 4K. Until section 16 it stopped at scale_4w with over 4 MB of the heap free: a worker's native stack comes from internal RAM, what is left of it here holds four, and a finished worker's stack waited for an idle task, which didn't run while the workers kept both cores. The port now frees it as the worker's thread ends.
    • Waking: a timer tick reaches the program in 12 µs against C's 10, and a pin edge in 12 against 10. Beside a busy worker, 12 µs for both, where C at equal priorities waits for the time slice: medians of 1,416 and 535.5 µs.
    • Size: a 269,218-byte image against C's 184,622, and less static RAM than C, 60,212 bytes against 75,512. The suite starts with 4,320,147 bytes of heap free, PSRAM included.
  • An event goes straight to the thread that waits for it on the ESP32s (section 14), the last of the remaining opportunities above. With nothing else running, a timer's tick or a pin's edge now reaches the program in 8 µs on the S3 and 10 on the WROOM, where it took 10 and 12: level with C's FreeRTOS queue. C written with a ring and a task notification takes 7 and 8 for a pin. Beside a busy worker the wake is 2 to 3 µs shorter too. The tables above are from the runs before this change.

What this report doesn't cover

  • One board of each kind, and one toolchain version for each implementation. Results lists them.
  • Interrupt latency from a pin in Rust, TinyGo and MicroPython, and in C on the H7 (Pin edges), allocation-heavy and string workloads, same-core against cross-core queues as a controlled comparison, and power (Methodology).
  • Networking. No benchmark here has WiFi up.
  • Issues in other projects that MicroGoose works around: the compilers, the Goose runtime, ESP-IDF, FreeRTOS and newlib. They are gathered, with their measured effect, in Known issues in other projects.

Checking it yourself

  • The tables. python bench/final.py --check fails if a table on this page isn't what the stored runs give, and python bench/report.py --check does the same for Results.
  • The runs. Each run folder under bench/results/ has its console output, every sample, its build log, its configuration and the source revision. before/ holds each change's "before", dev/ the steps and experiments, probes/ every probe's logs.
  • A run of your own. Methodology has the commands. The baseline is the tag perf-baseline.