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 versatile programming language developed by Sun Microsystems, now owned by Oracle Corporation. It supports development across various platforms through its "write once, run anywhere" approach. Java is known for its object-oriented structure, high performance, and robust security features ideal for enterprise systems and Android development.

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.

OS: Linux/DockerCPU: Ryzen 7 7800X3DLast Updated: 2025-05-04
Language
Time
Memory
1.00 s
22.9 MB
1.05 s
21.3 MB
1.14 s
16.3 MB
1.51 s
13.5 MB
4.18 s
16.3 MB
4.16 s
20.4 MB
4.18 s
19.8 MB

Popular languages

How does Java compare to other languages?
Language
Time
Memory
1.00 s
22.9 MB
1.02 s
584.0 KB
1.13 s
2.1 MB
1.39 s
448.0 KB
1.41 s
9.7 MB
3.27 s
13.4 MB
4.18 s
16.3 MB
83.69 s
6.8 MB
127.69 s
16.5 MB

© 2025 Tien Do Nam