language-bench

C vs Go

C is 1.78× faster
than Go overall (geometric mean over 11 problems). C wins 7, Go wins 4. C uses 2.87× less memory on average. C produces 160× smaller binaries.

Newest release and default build of each (C 16, Go 1.27), compared problem by problem. “Ratio” is C time ÷ Go time: below 1.0 means C is faster. Each cell shows time / memory / binary size; the better value is green.

ProblemCGoRatio (95% CI)
Binary Trees60.2 ms / 2.5 MB / 25 kB52.1 ms / 6.5 MB / 3.0 MB1.16× (0.99×–1.28×)
Fannkuch-redux18.7 ms / 0.4 MB / 17 kB19.5 ms / 1.0 MB / 3.0 MB0.96× (0.89×–1.03×)
File processing146 ms / 1.4 MB / 18 kB181 ms / 6.3 MB / 3.0 MB0.81× (0.79×–0.82×)
Hash map31.0 ms / 20.5 MB / 17 kB100 ms / 47.6 MB / 3.0 MB0.31× (0.29×–0.34×)
JSON parsing19.6 ms / 20.4 MB / 21 kB583 ms / 198 MB / 4.3 MB0.03× (0.03×–0.04×)
Matrix multiply2.0 ms / 3.2 MB / 21 kB6.6 ms / 7.7 MB / 3.0 MB0.30× (0.26×–0.37×)
N-Body simulation64.1 ms / 0.4 MB / 21 kB80.5 ms / 1.2 MB / 3.0 MB0.80× (0.78×–0.82×)
Parallel reduction105 ms / 0.5 MB / 17 kB98.1 ms / 1.1 MB / 3.0 MB1.07× (1.04×–1.10×)
Prime sieve21.4 ms / 10.4 MB / 17 kB20.4 ms / 22.0 MB / 3.0 MB1.05× (1.00×–1.10×)
Sorting267 ms / 16.2 MB / 17 kB164 ms / 40.4 MB / 3.0 MB1.63× (1.58×–1.67×)
String operations16.6 ms / 13.8 MB / 21 kB37.7 ms / 31.7 MB / 3.0 MB0.44× (0.43×–0.45×)

Over time

How both languages changed from release to release (default build). Switch problem or metric above the chart.

0.0 ms18 ms37 ms55 ms74 ms20252026GoGoCC

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.

Times are shown for the average machine (see methodology). A ratio whose 95% interval includes 1.0 is not a clear difference.