C vs Go
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.
| Problem | C | Go | Ratio (95% CI) |
|---|---|---|---|
| Binary Trees | 60.2 ms / 2.5 MB / 25 kB | 52.1 ms / 6.5 MB / 3.0 MB | 1.16× (0.99×–1.28×) |
| Fannkuch-redux | 18.7 ms / 0.4 MB / 17 kB | 19.5 ms / 1.0 MB / 3.0 MB | 0.96× (0.89×–1.03×) |
| File processing | 146 ms / 1.4 MB / 18 kB | 181 ms / 6.3 MB / 3.0 MB | 0.81× (0.79×–0.82×) |
| Hash map | 31.0 ms / 20.5 MB / 17 kB | 100 ms / 47.6 MB / 3.0 MB | 0.31× (0.29×–0.34×) |
| JSON parsing | 19.6 ms / 20.4 MB / 21 kB | 583 ms / 198 MB / 4.3 MB | 0.03× (0.03×–0.04×) |
| Matrix multiply | 2.0 ms / 3.2 MB / 21 kB | 6.6 ms / 7.7 MB / 3.0 MB | 0.30× (0.26×–0.37×) |
| N-Body simulation | 64.1 ms / 0.4 MB / 21 kB | 80.5 ms / 1.2 MB / 3.0 MB | 0.80× (0.78×–0.82×) |
| Parallel reduction | 105 ms / 0.5 MB / 17 kB | 98.1 ms / 1.1 MB / 3.0 MB | 1.07× (1.04×–1.10×) |
| Prime sieve | 21.4 ms / 10.4 MB / 17 kB | 20.4 ms / 22.0 MB / 3.0 MB | 1.05× (1.00×–1.10×) |
| Sorting | 267 ms / 16.2 MB / 17 kB | 164 ms / 40.4 MB / 3.0 MB | 1.63× (1.58×–1.67×) |
| String operations | 16.6 ms / 13.8 MB / 21 kB | 37.7 ms / 31.7 MB / 3.0 MB | 0.44× (0.43×–0.45×) |
Over time
How both languages changed from release to release (default build). Switch problem or metric above the chart.
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.