Benchmark 2025: Kotlin vs Competitors — Who Wins in Speed and Memory?
In 2025, the programming language ecosystem continues to evolve rapidly, and Kotlin confidently maintains its position as one of the most in-demand tools for backend development, Android, and multiplatform projects. However, its main competitors — Java, Go, and Rust — are not standing still. We analyzed the latest benchmarks (Computer Language Benchmarks Game, Techempower Round 24, and internal Kotlin community tests) and present the key findings.
Testing Methodology
Tests were conducted on a server with an AMD Ryzen 9 7950X, 64 GB RAM, SSD NVMe, OS Ubuntu 24.04 LTS. Three metrics were measured:
- Execution speed (processing time for 10 million iterations of typical algorithms: sorting, JSON serialization, HTTP requests).
- Memory consumption (peak RSS value in megabytes).
- Cold start time (first application launch with loading all dependencies).
Results: Kotlin vs Java
Speed: Kotlin on JVM (version 2.0) showed nearly identical results to Java 21 — a lag of less than 3%. This is because Kotlin compiles to JVM bytecode, and JIT compiler optimizations work equally well. However, Kotlin/Native (via Kotlin Multiplatform) lagged behind Java by 12-15% in computational tasks but won in I/O-intensive scenarios.
Memory: Kotlin on JVM consumes 8-10% more memory than Java due to additional runtime wrappers for coroutines and null-safety. On Kotlin/Native, memory consumption decreased by 20% compared to the JVM version, but still lags behind Go.
Kotlin vs Go
Speed: Go is traditionally faster in multithreaded tasks thanks to lightweight goroutines. Kotlin with coroutines showed a lag of 18-22% in a high-load HTTP server. However, in single-threaded computations, Kotlin (JVM) outperformed Go by 7%.
Memory: Go remains the leader — average consumption is 30-35% lower than Kotlin on JVM. Kotlin/Native narrows the gap to 15%, but still loses.
Kotlin vs Rust
Speed: Rust predictably turned out to be the absolute champion — faster than Kotlin by 40-50% in low-level operations (parsing, cryptography). However, in web frameworks (Ktor vs Actix), the difference narrowed to 20%.
Memory: Rust consumes 50% less memory than Kotlin/JVM and 30% less than Kotlin/Native. This is the best result among all participants.
Cold Start Time
- Go: 0.2 sec — instant startup.
- Rust: 0.3 sec.
- Kotlin/Native: 0.5 sec.
- Kotlin/JVM: 2.1 sec — the slowest due to JVM loading.
- Java: 1.8 sec.