Here's an amendment to my previous timing. I compiled the Go snippit with standard arguments (I don't know if there's a 'release' mode) and Nim with '-d:release', then ran each executable 20 times. Nim --- Mean: 0.08501 ms Median: 0.07966 ms Std Dev.: 0.03227 ms Lowest: 0.053365 ms Highest: 0.175821 ms Go --- Mean: 5.949 ms Median: 5.81 ms Std Dev.: 0.5054 ms Lowest: 5.359414 ms Highest: 7.220875 ms
As you can see, Go's garbage collector takes quite a bit longer than Nim's... Although it does have the benefit of being able to handle multiple threads (I think).