C
C compiled ahead-of-time by GCC. The classic performance baseline: no runtime, no garbage collector, manual memory management.
gcc.gnu.org ↗- Overall speed rank
- #1 of 3
- 1.00× the fastest language
- Latest release
- 16
- 12 tracked releases since 2015
Performance by problem
Newest release (16), default build (gcc -O3 -march=native). The index is how many times slower this language is than the fastest entry on that problem (1.00× = fastest); rank is among all languages.
| Problem | Time | vs fastest | Rank | Memory | |
|---|---|---|---|---|---|
| Binary Trees | 60.2 ms | 1.16× | #2 / 3 | 2.5 MB | |
| Fannkuch-redux | 18.7 ms | 1.02× | #1 | 0.4 MB | |
| File processing | 146 ms | 1.01× | #1 | 1.4 MB | |
| Hash map | 31.0 ms | 1.00× | #1 | 20.5 MB | |
| JSON parsing | 19.6 ms | 1.00× | #1 | 20.4 MB | |
| Matrix multiply | 2.0 ms | 1.06× | #1 | 3.2 MB | |
| N-Body simulation | 64.1 ms | 1.01× | #1 | 0.4 MB | |
| Parallel reduction | 105 ms | 1.12× | #2 / 3 | 0.5 MB | |
| Prime sieve | 21.4 ms | 1.07× | #2 / 3 | 10.4 MB | |
| Sorting | 267 ms | 1.66× | #2 / 3 | 16.2 MB | |
| String operations | 16.6 ms | 1.02× | #1 | 13.8 MB |
Compare with other languages
How fast each language is relative to C (composite over all tasks).
Build settings
gcc -O3 -march=native default
Maximum optimisation for the CPU the benchmark runs on (ties results to that CPU's instruction set).
gcc -O3 -march=native -ffp-contract=off -o {bin} {harness}/harness.c {src}/main.c -lm -lpthread{bin}gcc -O3
Portable x86-64 baseline, no CPU-specific instructions.
gcc -O3 -ffp-contract=off -o {bin} {harness}/harness.c {src}/main.c -lm -lpthread{bin}gcc -O2
The most common release optimisation level.
gcc -O2 -ffp-contract=off -o {bin} {harness}/harness.c {src}/main.c -lm -lpthread{bin}Every release (default build)
| Release | Binary Trees | Fannkuch-redux | File processing | Hash map | JSON parsing | Matrix multiply | N-Body simulation | Parallel reduction | Prime sieve | Sorting | String operations |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 2026-04-30 | 60.2 ms | 18.7 ms | 146 ms | 31.0 ms | 19.6 ms | 2.0 ms | 64.1 ms | 105 ms | 21.4 ms | 267 ms | 16.6 ms |
| 15 2025-04-25 | 61.1 ms | 18.9 ms | 147 ms | 31.5 ms | 20.1 ms | 1.9 ms | 63.9 ms | 107 ms | 21.7 ms | 258 ms | 16.5 ms |
| 14 2024-05-07 | 61.2 ms | 19.4 ms | 145 ms | 32.6 ms | 20.0 ms | 2.1 ms | 63.4 ms | 106 ms | 21.6 ms | 259 ms | 16.5 ms |
| 13 2023-04-26 | - | - | - | - | - | - | - | - | - | - | - |
| 12 2022-05-06 | - | - | - | - | - | - | - | - | - | - | - |
| 11 2021-04-27 | - | - | - | - | - | - | - | - | - | - | - |
| 10 2020-05-07 | - | - | - | - | - | - | - | - | - | - | - |
| 9 2019-05-03 | - | - | - | - | - | - | - | - | - | - | - |
| 8 2018-05-02 | - | - | - | - | - | - | - | - | - | - | - |
| 7 2017-05-02 | - | - | - | - | - | - | - | - | - | - | - |
| 6 2016-04-27 | - | - | - | - | - | - | - | - | - | - | - |
| 5 2015-04-22 | - | - | - | - | - | - | - | - | - | - | - |
Speed across releases
Did C get faster? Every tracked release plotted at its release date, one line per build setting. Shows time, memory or binary size over all problems by default.
9 tracked releases have not been measured for this problem yet (13, 12, 11, 10, 9, 8, 7, 6, 5, shown faded on the axis). Lines appear as soon as a second release has data.
Each point is one language release on its official release date, measured on an average machine. Hover a line, its label or a legend button to highlight it; hover a point for release highlights. “All problems” is the geometric mean over every scored problem; releases not yet measured on all of them are left out.
Release highlights
- C 16 2026-04-30GCC 16.1 release
- C 15 2025-04-25C23 becomes the default C dialect (-std=gnu23) · COBOL front end added
- C 14 2024-05-07Implicit int / implicit function declarations become errors by default in C · -fhardened option · AMD Zen 5 support
- C 13 2023-04-26C2x/C23 feature work, new -fanalyzer checks · Modula-2 front end added
- C 12 2022-05-06
- C 11 2021-04-27
- C 10 2020-05-07
- C 9 2019-05-03
- C 8 2018-05-02
- C 7 2017-05-02
- C 6 2016-04-27
- C 5 2015-04-22
Badge
Show this language's overall rank in your README or website:
[](https://stijnris.github.io/language-bench/languages/c/)<a href="https://stijnris.github.io/language-bench/languages/c/"><img src="https://stijnris.github.io/language-bench/badges/c.svg" alt="C on language-bench"></a>