language-bench

Go vs Python

Go is 10.3× faster
than Python overall (geometric mean over 11 problems). Go wins 11, Python wins 0. Go uses 2.53× less memory on average.

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.

ProblemGoPythonRatio (95% CI)
Binary Trees52.1 ms / 6.5 MB / 3.0 MB288 ms / 9.3 MB / no binary0.18× (0.16×–0.21×)
Fannkuch-redux19.5 ms / 1.0 MB / 3.0 MB475 ms / 6.2 MB / no binary0.04× (0.04×–0.04×)
File processing181 ms / 6.3 MB / 3.0 MB913 ms / 6.8 MB / no binary0.20× (0.19×–0.21×)
Hash map100 ms / 47.6 MB / 3.0 MB397 ms / 135 MB / no binary0.25× (0.18×–0.34×)
JSON parsing583 ms / 198 MB / 4.3 MB714 ms / 154 MB / no binary0.82× (0.76×–0.87×)
Matrix multiply6.6 ms / 7.7 MB / 3.0 MB954 ms / 18.1 MB / no binary0.01× (0.01×–0.01×)
N-Body simulation80.5 ms / 1.2 MB / 3.0 MB6.42 s / 6.6 MB / no binary0.01× (0.01×–0.01×)
Parallel reduction98.1 ms / 1.1 MB / 3.0 MB2.19 s / 16.6 MB / no binary0.04× (0.04×–0.05×)
Prime sieve20.4 ms / 22.0 MB / 3.0 MB395 ms / 41.1 MB / no binary0.05× (0.05×–0.05×)
Sorting164 ms / 40.4 MB / 3.0 MB756 ms / 106 MB / no binary0.22× (0.19×–0.23×)
String operations37.7 ms / 31.7 MB / 3.0 MB72.6 ms / 42.4 MB / no binary0.52× (0.51×–0.53×)

Over time

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

0.0 ms194 ms387 ms581 ms775 ms20252026PythonPythonGoGo

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.