Sharkbench

Benchmarking programming languages and web frameworks

C Computation Benchmark

About C

Paradigm

Procedural, Imperative

Execution

Compiled

Typing

Static

Null Safety

NO

Memory Management

Manual

C is a general-purpose programming language developed in the early 1970s that is known for its efficiency and control over system resources. It has influenced many other languages including C++, Java, and Python. C is widely used for high-performance computing applications due to its compiled nature and manual memory management.

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.39 s
448.0 KB
1.42 s
412.0 KB
1.34 s
404.0 KB
1.32 s
384.0 KB
1.35 s
436.0 KB
1.38 s
420.0 KB
1.58 s
384.0 KB
1.54 s
392.0 KB
1.30 s
396.0 KB

Popular languages

How does C 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
83.69 s
6.8 MB
127.69 s
16.5 MB

© 2025 Tien Do Nam