Twenty interleaved passes of the chart's benchmark (6 s with startup and the 3-8 s steady state, 60 fps, pinned clock) for Reaktor's four renderers and Electron 44.3.0: software 8.4 MB / 6.6%, direct3d11 57.7 MB / 12.5%, direct3d12 120.5 MB / 5.0%, opengl 69.2 MB / 5.8%, Electron 155.2 MB / 20.7%. Flutter and Kotlin Multiplatform were not rebuilt and keep their figures of 2026-10-24, dated as such in the chart and the table. Idle memory, ten launches each, taken in turn with 0.10.0: showcase 15.8 MB (12.9 on 0.10.0), notepad 11.0 (8.8), simple 7.3 (7.1), so the quoted range is now 7-16 MB. A new Interaction section: master against 0.10.0 on hover, slider drag, typing and the wheel, twelve pairs each. A drawn frame takes 41-43% less time, 20% less on the wheel. PERFORMANCE.md drops figures from builds the code has left behind: the four-platform tables of the single-executable build, the web module sizes from before the CSS engine, the libdbus tray comparison. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.4 KiB
Benchmarks
Five UI stacks draw the same animation, and one script measures each from
outside its process. The results are the chart in
docs/PERFORMANCE.md.
| Arm | Directory | Built with |
|---|---|---|
| Reaktor | samples/bench/ |
build.ps1 / build.sh |
| Electron | electron-bench/ |
npm |
| Flutter | flutter-bench/ |
Flutter SDK |
| Compose Multiplatform | kmp-bench/ |
Gradle |
| Shaft | shaft-bench/ |
SwiftPM, macOS only — below |
Running it
./benchmarks/run.ps1 # every arm, 6 s, 60 fps, 10 runs
./benchmarks/run.ps1 -Targets electron,kmp -Runs 3
./benchmarks/run.ps1 -Csv bars.csv
run.ps1 also takes -Seconds, -Fps and -Boxes, and three switches:
-Steady adds the CPU from 3 s to 8 s of a 9-second run, -FlatOut the time
a Reaktor frame takes drawn without vsync, and -PinClock holds the processor
at full speed for the run, through a copy of the power plan it removes after.
run.sh is the same for macOS, Linux and the BSDs (--targets, --runs,
--seconds, --fps, --boxes, --csv). Nothing is built for you: a missing
arm is skipped, with the command that builds it.
Reaktor runs four times — reaktor-software, its default, and
reaktor-d3d11, reaktor-d3d12 and reaktor-opengl, the same binary on
SDL's GPU drivers (run.sh adds reaktor-metal on macOS). The others draw on
the GPU, so those three are the like-for-like comparison. SDL's OpenGL driver
is built only when REAKTOR_RENDERERS names it, which the reaktor-opengl
arm's build does. An arm whose renderer would not start is skipped, not measured
under another renderer's name. The chart dates its arms: Reaktor's three are
re-measured when the runtime changes in a way that could move them, last on
2026-11-09 with Electron; Flutter and Kotlin Multiplatform last on 2026-10-24.
What every arm draws
-
An 800×600 drawing area, not counting the window frame.
-
A #f7f7f7 background, Reaktor's light theme.
-
64 quads, each spinning about its center. For box
iin aw×harea,tseconds after the first frame:a = t * (1 + 0.05 * i) cx = (i % 8) * (w / 8) + w / 16 cy = (i / 8) * (h / 8) + h / 16 r = h / 24 vertex k = (cx + r * cos(a + k * pi/2), cy + r * sin(a + k * pi/2)) fill = rgb(60 + (i * 3) % 190, 140, 220)The divisions are integer divisions, as in
bench.c, which every arm was written from. -
Antialiasing at each framework's default, on in all of them.
Every arm takes --bench-seconds N, --fps F (0 uncapped) and --boxes N,
and prints key value lines as it quits. size must read 800x600 for a run
to count, and fps shows whether the rate held. Each framework times a
different part of the frame, so only the script's numbers compare.
How it measures
Every 100 ms the script samples the whole process tree: the peak of its summed
memory, and the processor time charged to it — so Electron's five processes
and a JVM stand beside one C executable. CPU comes out as CpuCore, a percent
of one core, and CpuMachine, over every logical processor; each figure is
the median of all runs.
- Keep runs at 6 seconds. Startup counts, and some arms pay far more for it: at 3 seconds Electron reads 45.5% of a core instead of 37.5%.
- The scripts read memory differently.
run.ps1uses private bytes,run.shresident set size, which counts shared pages against every process and inflates Electron and the JVM. Comparerun.shnumbers only with each other; withoutperlit also times runs to the whole second.
Building the arms
Each arm uses its framework's own toolchain; none is vendored here.
Electron
cd benchmarks/electron-bench
npm install
npx install-electron
Node 20.19+ or 22+; older Node fails with ERR_REQUIRE_ESM. Since Electron 44
npm install no longer fetches the binary; install-electron does. --software
turns hardware acceleration off.
Flutter
cd benchmarks/flutter-bench
./setup.ps1
flutter build windows --release
Only the Dart is checked in. setup.ps1 generates the Windows runner and
patches in the title and an 800×600 client area, by regex over generated code
— a new Flutter template can break it, and the size line will show it.
Compose Multiplatform
cd benchmarks/kmp-bench
gradle createDistributable
A full JDK 17+ and Gradle 8.7+; Android Studio's bundled JBR has no
jpackage. Run the packaged app, not gradle run, or the daemon is measured
too. The JVM gets no heap flags.
Shaft
cd benchmarks/shaft-bench
swift build -c release
It does not link on Windows: SwiftSDL3 0.1.6 never compiles its joystick
sources there, leaving SDL_SetJoystickVirtualButtonInner undefined, and one
Swift package cannot add sources to another. Until that changes it runs on
macOS only and stays out of the chart. To get as far as that link on Windows,
build from vcvars64.bat with GIT_CONFIG_COUNT=1,
GIT_CONFIG_KEY_0=core.symlinks and GIT_CONFIG_VALUE_0=false. The -bench
suffix keeps SwiftPM, which names a package after its directory, from
colliding with Shaft itself.
What still is not equal
- The rasterizer. Reaktor draws on the CPU by default, the others on the GPU. Its GPU arms narrow the gap without closing it: SDL's OpenGL renderer is not Skia.
- Frame pacing. At
--fps 60every arm waits out its frame, then asks for exactly one more. Skipping vsyncs that are not due looks simpler and drifts: to 41.6 fps in Flutter and 42.7 in Compose, which is why every arm printsfps.
Bundle sizes
Reaktor's arm ships as one file. SDL, the CSS engine, the SVG rasterizer, the
fonts and the default look are linked into every program, so bench.exe
needs nothing beside it. Built the way the release builds them — Windows x64,
MSVC 14.44 Release, the C runtime linked in:
| Program | Bytes |
|---|---|
bench.exe |
2,352,640 |
simple.exe |
2,362,880 |
notepad.exe |
2,497,536 |
showcase.exe |
3,438,592 |
The C runtime is about 220 KB of each; a default ./build.ps1 links its DLL
instead. The showcase links every module and notepad three, and Text is
0.6 MB of the difference (Modules).
The v0.2.0 downloads, as GitHub Actions built and published them:
| System | Architecture | Programs | libreaktor |
|---|---|---|---|
| Windows | x64 | 6.2 MB | 4.4 MB |
| Windows | x86 | 5.4 MB | 3.6 MB |
| Windows | ARM64 | 5.6 MB | 4.4 MB |
| macOS | Apple silicon | 8.3 MB | 2.8 MB |
| macOS | Intel | 9.2 MB | 2.9 MB |
| Linux | x86-64 | 7.6 MB | 3.2 MB |
| Linux | x86 | 7.2 MB | 3.1 MB |
| Linux | ARM64 | 7.0 MB | 3.1 MB |
| Linux | ARMv7 | 5.7 MB | 2.6 MB |
| Linux | RISC-V 64 | 7.3 MB | 5.1 MB |
| FreeBSD 15.1 | x86-64 | 6.4 MB | 2.9 MB |
| FreeBSD 15.1 | ARM64 | 5.9 MB | 2.8 MB |
| OpenBSD 7.9 | x86-64 | 6.9 MB | 3.3 MB |
| OpenBSD 7.9 | ARM64 | 6.7 MB | 3.4 MB |
| NetBSD 11.0 | x86-64 | 7.1 MB | 3.0 MB |
| NetBSD 11.0 | ARM64 | 6.8 MB | 3.0 MB |
| Web | WebAssembly | 2.7 MB | 2.0 MB |
A program archive holds the showcase, Notepad, Simple and, natively, the
bench, with the files they read at runtime and every license; macOS's also
carries the showcase as reaktor.app. A libreaktor archive is one static
library with the public headers, Nuklear's and SDL's, a CMake package, a
pkg-config file outside Windows, and the licenses. The source, every submodule
included, is 23.2 MB.