Skip to content

Instantly share code, notes, and snippets.

Metric Native Image JVM Winner
Build Time ~210s (3.5 min) ~15s JVM (14x faster)
Docker Image Size 123 MB 254 MB Native (52% smaller)
Startup Time 0.079 s (79 ms) 2.292 s Native (~29x faster)
Memory (Startup) 16.27 MiB 113.5 MiB Native (86% less)
Memory (Load) 26.71 MiB 122.6 MiB Native (78% less)
Runtime Performance Good Excellent (after warmup) JVM (long-term)
Metric Native Executable JVM JAR Notes
Size ~99 MB ~49 MB Native executable is larger but includes everything
Portability Platform-specific Cross-platform JAR runs on any JVM
Metric Native Image JVM Difference
Memory at Startup 16.27 MiB 113.5 MiB 97.23 MiB (~86% less for Native)
Memory under Load 26.71 MiB 122.6 MiB 95.89 MiB (~78% less for Native)
Memory Growth ~10.44 MiB ~9.1 MiB -
Metric Native Image JVM Difference
Startup Time 0.079 s (79 ms) 2.292 s 2.213 s (~29x faster for Native)
Cold Start Instant Requires warmup -
First Request Fast Slower (JIT not warmed up) -
Metric Native Image JVM Difference
Docker Image Size 123 MB 254 MB 131 MB (107% larger for JVM)
Base Image Minimal UBI Alpine + JRE -
Application Artifact Native executable JAR + dependencies -
Metric Native Image JVM Difference
Build Time ~210 seconds ~15 seconds 195 seconds (1300% slower)
Build Complexity High (AOT compilation) Low (Standard compilation) -
| Metric | Native Image | JVM | Difference |
|--------|--------------|-----|------------|
| Build Time | ~210 seconds | ~15 seconds | 195 seconds (1300% slower) |
| Build Complexity | High (AOT compilation) | Low (Standard compilation) | - |