4 ms·
It's as easy and as expressive as python, nearly as fast as C and less complicated than both. That's good enough in my book.
by chrisjsmith 15y ago
It's as easy and as expressive as python, nearly as fast as C and less complicated than both. That's good enough in my book.
- bfung 15y agonearly as fast as C not quite; using comparisons from the The Computer Language Benchmarks Game [http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php?gpp=on&gcc=on&java=on&ghc=on&csharp=on&go=on&racket=on&python3=on&yarv=on&calc=chart http://shootout.alioth.debian.org/u32/which-programming-lang...], Go is currently (in general) slower than C++ gnu g++, C gnu gcc, Java 6 -server, Haskell GHC, C# mono, just to name a few. Sure, it's not a definitive view, but it's better than code not run and compared.
- uriel 15y agoGo's compilers are still very young and do almost no optimizations. Also, the 32bit compilers are specially bad as they are not really used by most of the Go developers, the 64bit compilers do much better as you can see here: http://shootout.alioth.debian.org/u64/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u64/which-programming-lang...
- limmeau 15y agoThere is also gccgo, which uses (and profits from) the gcc backend.
- chrisjsmith 15y agoIs closer in performance to C than to Python more acceptable?
- igouy 15y agoFor you, is 2.12 seconds nearly as fast as 1.77 seconds? For 5 of those 10 tasks, the measurements on x64 show a C program less than twice as fast as a Go program. http://shootout.alioth.debian.org/u64q/compare.php?lang=go http://shootout.alioth.debian.org/u64q/compare.php?lang=go Could it be that those C programs were more highly optimised by the C programmers? http://shootout.alioth.debian.org/u64q/program.php?test=spectralnorm&lang=gcc&id=4 http://shootout.alioth.debian.org/u64q/program.php?test=spec... http://shootout.alioth.debian.org/u64q/program.php?test=spectralnorm&lang=go&id=3 http://shootout.alioth.debian.org/u64q/program.php?test=spec...
- sigzero 15y agoIt's not "as easy" as Python and "expressive" is hard to measure.
- chrisjsmith 15y agoIt's all down to opinion. This is all IMHO. I've found Python to be quite obtuse at times, particularly with the notion that it's sometimes functional and sometimes not. (Consider generators being promoted and map being demoted by Guido for not being 'pythonic'). Expressiveness is hard to measure I agree, but I find enough utility in Go to perform the same amount of work in a roughly equivalent number of keypresses. That's my metric.