4 ms·
Pretty much like you would expect, the Go code is a bit longer but much more efficient at runtime; similar to what you see at the benchmark game: http://benchma
by voidlogic 14y ago
Pretty much like you would expect, the Go code is a bit longer but much more efficient at runtime; similar to what you see at the benchmark game: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=python3 http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
Note: That graph is using go 1.0.3 not Go tip which is even faster.
I do believe the Go code is more maintainable and I like the fact it is statically typed.
- aleyan 14y agoGo is quite a bit faster and memory efficient than Python3? No unexpected. Curious how it stacks up with PyPy. Looking at the Benchmark Game Go vs Java7[0], why is Java 2x to 8x faster than Go for many benchmarks? Is the jvm that optimized these days or are those Java7 programs super tweaked for performance? [0] http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=java http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
- Ziomislaw 14y agojvm is really fast, it can usually compete with C++ code in terms of speed (if you ignore the startup time ;p )
- voidlogic 14y agoThe JVM is really fast- but to be fair note the JVMs memory usage in that comparison. Also version of Go used in that comparison is Go 1.0.3 and Go 1.1 RC (which is much faster and has better garbage collection) is going to be out next month. Go is a very young language so while very fast compared to an interpreted language like Ruby, Python, etc by virtue of being compiled, it going to take some time be be on par (in terms of execution speed) with a Java, a JIT language that has had 18 years to mature. It says a lot for Go that its execution time is on par with C#: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=go&lang2=csharp http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...