5 ms·
nearly as fast as C not quite; using comparisons from the The Computer Language Benchmarks Game [http://shootout.alioth.debian.org/u32/which-programming-lang
by bfung 15y ago
nearly 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...