From Node to Go: A High-Level Comparison
John Stamatakos
19717

As other said, Go really shouldn’t include build time.

Another thing I didn’t notice anyone say is that the Python I/O code should not call dot-functions in tight loops. I gave it a try at my machine:

# pypy3 5.7.1-beta0, “latest” docker image right now

# y.py:

with open(“python”, “a”) as text_file:
tw = text_file.write
for i in range(1000000):
tw(str(i))

$ time pypy3 y.py

real 0m0.166s

user 0m0.120s

sys 0m0.040s

# Go 1.8

$ time go run main.go

real 0m0.246s

user 0m0.171s

sys 0m0.074s

$ go build main.go && time ./main

real 0m0.073s

user 0m0.056s

sys 0m0.015s

Show your support

Clapping shows how much you appreciated Pontus Leitzler’s story.