Go Compiler Is Producing Faster Code

According to Fig.8 in this paper published in 2011, given the Havlack loop recognition algorithm implemented using Go and C++, the running time of the Go version is 7 times of that of the C++ version. Even after tuning the Go version, the ratio is still 5.5x.

This gap seems shrinks since the paper was published.  Today, I ran the same program on my macbook with OS X Mountain Lion, I found the ratios are 3.11 and 2.18 respectively.  I used Go 1.0.3 and i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1.