language-bench

C++

C++ compiled ahead-of-time by g++ (GCC). Zero-cost abstractions and a rich standard library, with RAII-based memory management.

gcc.gnu.org ↗
Overall speed rank
-
no data yet
Latest release
16
12 tracked releases since 2015
Strongest on
-
Weakest on
-

Performance by problem

Newest release (16), default build (g++ -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.

No benchmark sessions have been recorded yet.

The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.

Build settings

g++ -O3 -march=native default

Maximum optimisation for the CPU the benchmark runs on (ties results to that CPU's instruction set).

g++ -std=c++14 -O3 -march=native -ffp-contract=off -o {bin} {harness}/harness.cpp {src}/main.cpp -lpthread{bin}

g++ -O3

Portable x86-64 baseline, no CPU-specific instructions.

g++ -std=c++14 -O3 -ffp-contract=off -o {bin} {harness}/harness.cpp {src}/main.cpp -lpthread{bin}

g++ -O2

The most common release optimisation level.

g++ -std=c++14 -O2 -ffp-contract=off -o {bin} {harness}/harness.cpp {src}/main.cpp -lpthread{bin}

Every release (default build)

No benchmark sessions have been recorded yet.

The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.

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.

No benchmark sessions have been recorded yet.

The first scheduled GitHub Actions run will publish real measurements here. Everything on this page is computed from raw iterations in data/.

Release highlights

  1. C++ 16 2026-04-30
    GCC 16.1 release
  2. C++ 15 2025-04-25
    C23 becomes the default C dialect (-std=gnu23) · COBOL front end added
  3. C++ 14 2024-05-07
    Implicit int / implicit function declarations become errors by default in C · -fhardened option · AMD Zen 5 support
  4. C++ 13 2023-04-26
    C2x/C23 feature work, new -fanalyzer checks · Modula-2 front end added
  5. C++ 12 2022-05-06
  6. C++ 11 2021-04-27
  7. C++ 10 2020-05-07
  8. C++ 9 2019-05-03
  9. C++ 8 2018-05-02
  10. C++ 7 2017-05-02
  11. C++ 6 2016-04-27
  12. C++ 5 2015-04-22

Badge

Show this language's overall rank in your README or website:

PreviewC++ rank on language-bench
Markdown[![C++ on language-bench](https://stijnris.github.io/language-bench/badges/cpp.svg)](https://stijnris.github.io/language-bench/languages/cpp/)
HTML<a href="https://stijnris.github.io/language-bench/languages/cpp/"><img src="https://stijnris.github.io/language-bench/badges/cpp.svg" alt="C++ on language-bench"></a>