by Xorlev · 13y ago · 0 comments
As of 1.1 Go code generation is also drastic improved. I would love to see Go 1.0.3 vs Go 1.1 vs GCCGO tests with a wide sample of programs.
The compilers where : Go 1.1rc, GccGo version 4.8.0 20130502 (prerelease), on an Arch Linux 64-bit system, Core i5
binary-tree.go
gccgo-4.8: 0m0.932s
go-1.1rc1: 0m1.835s
binary-tree-freelist.go
gccgo-4.8: 0m0.165s
go-1.1rc1: 0m0.307s
chameneosredux.go
gccgo-4.8: 0m10.163s
go-1.1rc1: 0m5.620s
fannkuch.go
gccgo-4.8: 0m44.533s
go-1.1rc1: 0m56.389s
fannkuch-parallel.go
gccgo-4.8: 0m26.525s
go-1.1rc1: 0m27.855s
fasta.go
gccgo-4.8: 0m1.126s
go-1.1rc1: 0m1.250s
mandelbrot.go
gccgo-4.8: 0m30.004s
go-1.1rc1: 0m30.537s
nbody.go
gccgo-4.8: 0m11.423s
go-1.1rc1: 0m12.620s
pidigits.go
gccgo-4.8: 0m7.333s
go-1.1rc1: 0m2.321s
spectral-norm.go
gccgo-4.8: 0m12.259s
go-1.1rc1: 0m13.389s
spectral-norm-parallel.go
gccgo-4.8: 0m3.142s
go-1.1rc1: 0m6.695s
threadring.go
gccgo-4.8: 0m37.421s
go-1.1rc1: 0m9.800s
Overall I'd say Go did better as in the instances GccGo won (although more numerous) it was typically with a small margin while on those GccGo lost we had larger margins.Overall Go 1.1rc seems to have improved quite a bit from my previous test (1.0x) unless my memory betrays me.
Note that these are far from all the 'computer language benchmarks game' tests, only those which I managed to get done during lunch break, and as such they may skew the results compared to a full benchmark comparison.
Most to the point, the mandelbrot program shown on the benchmarks game is not the same -- someone contributed an improved program to the benchmarks game.
Last time I checked GccGo won most of them hands down and even more so when you changed the optimization from -O2 to -O3 (on my machines atleast 'i5/i7' -O2 always lost to -O3 in these tests so I don't know why they defaulted to -O2 here).
This was on 1.03 I think, I haven't checked on 1.1x as of yet and given that there's been improvements in the Go compiler the overall results may have changed considerably.