Sharkbench

Benchmarking programming languages and web frameworks

Java Computation Benchmark

About Java

Paradigm

Object-Oriented, Imperative

Execution

JIT, AOT

Typing

Static

Null Safety

NO

Memory Management

Garbage Collection

Java is a widely-used, versatile programming language developed by Sun Microsystems, now owned by Oracle Corporation. Java supports the development of applications ranging from small mobile applications to large enterprise systems and is known for its portability, high performance, and robust security features. Its object-oriented structure promotes a clean, modular approach to programming, which is ideal for building scalable and maintainable software solutions.

Benchmarks

This benchmark tests how fast a programming language can perform mathematical computations without any I/O or memory allocation. We are using the Leibniz formula to approximate the value of PI.
Please note that the memory usage also includes the memory used by the HTTP server. Ideally, the most lightweight HTTP server should be used to measure the raw memory usage of the runtime.
Language
Time
Memory
Java (Temurin v21)
1.63 s
20.2 MB
Java (Temurin v17)
1.63 s
19.7 MB
Java (Temurin v11)
1.63 s
11.4 MB
Java (Temurin v8)
1.69 s
10.3 MB
Java (Semeru v21)
2.03 s
18.8 MB
Java (Semeru v17)
2.03 s
17.7 MB
Java (Semeru v11)
2.23 s
17.5 MB

© 2024 Tien Do Nam