Nucleus
Performance & native

Benchmarks

Measured results of one CPU, rendering and list-load suite run inside a Compose desktop app on the JVM, GraalVM Native Image, SwiftUI, Tauri and Flutter.

View as Markdown

The benchmark-demo example runs one suite inside a Compose desktop app: 13 CPU kernels, three rendering ramps and a list-load test. The same kernels are ported to SwiftUI, Tauri and Flutter. Every variant ran on an Apple M4 on 2026-07-16.

Higher is better for CPU and GFX; lower is better for list, peak RAM and app size. Composite scores compare only within this suite.

Summary

Sorted by composite CPU score.

#VariantRuntimeCPUGFXlist (ms)Peak RAMApp size
1jvm-graalGraalVM 25.0.3 JIT + ProGuard146.71304121.0695 MB160 MB
2tauriRust + WebView (WKWebView)142.215013233.0794 MB †5.6 MB ‡
3jvm-c2-pgOpenJDK 26 C2 + ProGuard140.41304120.9616 MB119 MB
4swiftuiSwift/LLVM + SwiftUI138.71525414.4268 MB0.34 MB ‡
5jvm-c2OpenJDK 26 C2 (no ProGuard)138.51304121.6620 MB136 MB
6aot-o3-pgoGraalVM Native -O3 + PGO132.71385917.1269 MB129 MB
7aot-o3GraalVM Native -O3 (ML-inferred)100.81385917.1297 MB174 MB
8aot-o2GraalVM Native -O286.91123917.2278 MB150 MB
9aot-osGraalVM Native size-opt (-Os)80.11043317.3326 MB129 MB
10flutterDart AOT + Impeller57.31513317.2196 MB37 MB

† Includes the WebKit processes; an upper bound. ‡ Excludes the system engine (SwiftUI and AppKit, or WebKit), so it does not compare directly with the variants that ship their runtime.

Read the results

  • CPU. GraalVM JIT scores highest (146.7). Tauri (142), SwiftUI (139) and OpenJDK C2 (138 to 140) sit close together. GraalVM Native reaches that group only with PGO (100.8 to 132.7).
  • PGO. aot-o3-pgo reaches 132.7 CPU with 269 MB of peak RAM, against 616 to 695 MB for the JVM variants. The cost is the PGO workflow: an instrumented build, a GUI run, then a rebuild. The profile also shrinks the image from 174 MB to 129 MB.
  • RAM. Flutter uses the least (196 MB), then SwiftUI (268) and GraalVM Native (269 to 326). The JVM variants use 616 to 695 MB, and Tauri 794 MB (†).
  • List load. GraalVM Native takes about 17 ms, the JVM about 21 ms, SwiftUI 14 ms and Tauri 233 ms.
  • Flutter has the lowest CPU score (57.3) but one of the highest GFX scores (15133).

Per-kernel CPU

Throughput, higher is better.

Kerneljvm-graaltaurijvm-c2-pgswiftuijvm-c2aot-o3-pgoaot-o3aot-o2aot-osflutter
mandelbrot4.094.134.333.923.991.983.321.973.273.61
nbody700.6693.2639.6659.4691.3694.7683.0654.8678.3608.7
raytracer17.219.818.919.819.017.515.814.07.04.2
matmul1421716224166901621516724122253877324431053054
blur93.444.559.780.749.291.549.546.636.530.0
sha256332.9442.1361.2360.3361.7326.9296.8294.9268.2192.4
sieve708.5642.3565.9603.6599.9725.9467.2463.2484.4268.6
fft407.8452.7441.5436.9441.1363.9369.6376.3356.8366.9
pi0.090.110.110.110.100.100.090.090.090.08
mandelbrot_mt15.516.515.616.116.114.514.17.512.210.6
raytracer_mt74.581.268.675.067.271.460.249.925.513.7
matmul_mt6208869442640383301363925601131998817255159569731
blur_mt345.0188.4244.1261.7238.3285.9203.5194.4155.140.0

Render ramps

Highest load sustained at 55 fps or more, higher is better.

VariantParticlesStarsTexts
swiftui125000181753906
aot-o3 / o3-pgo75000145406102
jvm (×3)50000181756102
flutter50000181759533
aot-o250000116326102
aot-os5000093066102
tauri250001817518618

Reproduce

terminal
cd examples/benchmark-demo

# JVM and native matrix
JAVA_HOME=<jbr-21> GRAALVM_HOME=<graalvm-25> JDK_C2_HOME=<jdk-26> \
  ONLY="jvm-c2 jvm-c2-pg jvm-graal aot-os aot-o2 aot-o3 aot-o3-pgo" ./run-all.sh

# Ports
ONLY="swiftui tauri flutter" ./run-all.sh

Run the native builds with JAVA_HOME pointing at GraalVM, or Gradle may pick a cached Oracle JDK 25 without native-image and the compile fails. Each variant writes a result JSON, and the example's RESULTS.md holds the full per-variant appendix.

What's next

Was this page helpful?
Edit on GitHub

Last updated on