4 ms·
Yes I too find the Language Shootout a very interesting benchmark (while knowing full and well it's shortcomings) and it shows (imo) that Go has alot of work to
by gillianseed 14y ago
Yes I too find the Language Shootout a very interesting benchmark (while knowing full and well it's shortcomings) and it shows (imo) that Go has alot of work to do in the optimization department, something one can confirm by compiling cpu intensive go code using gccgo which will often yield great performance improvements.
Not surprising though, as GCC's optimization backend is very strong and has been developed for a long time, meanwhile Go's compiler toolchain is very young.
As for Scala vs Go, Scala compiles into Java bytecode and then makes use of Java's excellent and very mature JIT compiler so I'm not surprised Go loses out to it for the same reasons mentioned above.
Also note that the Go version used on the 'Language Shootout' is the 1.03 version, not the upcoming 1.1 version, it will be interesting to see what improvements in performance have been made.
AFAIK the 32-bit version of Go (which is what you compared with in your link) has not been given as much love in the optimization department as the 64-bit version, which I guess would do slightly better atleast.
- igouy 14y ago>>while knowing full and well it's shortcomings<< Without knowing it's name :-)
- gillianseed 14y agoheh, well it was called the 'computer language shootout' back in the day and that's the name that has stuck with me.
- igouy 14y agoBack in the day, that old project wasn't on quad-core and wasn't on Ubuntu -- and we should wonder whether your understanding of what's shown is also 6 years out-of-date ;-)
- gillianseed 14y agoeven if I google 'language shootout' the top link is the (now) correct 'Computer Language Benchmarks Game' and what is shown there is not 6 years old. Is there a point to you continuing to spin on this???
- igouy 14y agoGiven that the banner shown on every web-page changed, do you think there might be other changes which you haven't noticed?
- gillianseed 14y agoLike what? I come there for the benchmark results and for looking at the source code versions presented for the languages I'm interested in. The banner is of very little concern to me, which is why it hadn't registered with me.
- mturmon 14y ago@igouy: you have now made three comments without any substance, but which question the expertise of the original commenter on the basis of a small issue of nomenclature. If you have something specific to say, say it.
- onan_barbarian 14y agoGo's compiler toolchain is not "very young". Go's compiler toolchain is derived from the Plan 9 C compiler and is a decade older than modern gcc (4.x), which has substantially rewritten its optimization framework relatively recently with "GENERIC" and "GIMPLE". There are no equivalent changes in the go backend. The reason the code quality (in optimization terms) of Go's compiler isn't that great is that the Plan 9 C compiler was always designed for fast compiles. This is a matter of design.
- Scaevolus 14y agoThe Go compiler converts its AST to assembly directly. There's a peephole optimizer and certain AST patterns are specially handled, but overall the compiler is extremely simple. By comparison, LLVM/GCC passes code through multiple internal representations and performs many complex optimizations on them before emitting assembly.