Go vs Python
Newest release and default build of each (Go 1.27, Python 3.15), compared problem by problem. “Ratio” is Go time ÷ Python time: below 1.0 means Go is faster. Each cell shows time / memory / binary size; the better value is green.
| Problem | Go | Python | Ratio (95% CI) |
|---|---|---|---|
| Binary Trees | 52.1 ms / 6.5 MB / 3.0 MB | 288 ms / 9.3 MB / no binary | 0.18× (0.16×–0.21×) |
| Fannkuch-redux | 19.5 ms / 1.0 MB / 3.0 MB | 475 ms / 6.2 MB / no binary | 0.04× (0.04×–0.04×) |
| File processing | 181 ms / 6.3 MB / 3.0 MB | 913 ms / 6.8 MB / no binary | 0.20× (0.19×–0.21×) |
| Hash map | 100 ms / 47.6 MB / 3.0 MB | 397 ms / 135 MB / no binary | 0.25× (0.18×–0.34×) |
| JSON parsing | 583 ms / 198 MB / 4.3 MB | 714 ms / 154 MB / no binary | 0.82× (0.76×–0.87×) |
| Matrix multiply | 6.6 ms / 7.7 MB / 3.0 MB | 954 ms / 18.1 MB / no binary | 0.01× (0.01×–0.01×) |
| N-Body simulation | 80.5 ms / 1.2 MB / 3.0 MB | 6.42 s / 6.6 MB / no binary | 0.01× (0.01×–0.01×) |
| Parallel reduction | 98.1 ms / 1.1 MB / 3.0 MB | 2.19 s / 16.6 MB / no binary | 0.04× (0.04×–0.05×) |
| Prime sieve | 20.4 ms / 22.0 MB / 3.0 MB | 395 ms / 41.1 MB / no binary | 0.05× (0.05×–0.05×) |
| Sorting | 164 ms / 40.4 MB / 3.0 MB | 756 ms / 106 MB / no binary | 0.22× (0.19×–0.23×) |
| String operations | 37.7 ms / 31.7 MB / 3.0 MB | 72.6 ms / 42.4 MB / no binary | 0.52× (0.51×–0.53×) |
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.