To read all comments associated with this story, please click here.
Your test case is like measuring language performance by seeing who runs this C++ code the fastest:
for(int i = 0; i < 100000; i++);
That is a useless micro-benchmark.
Any program I have written in Go that is non-trivial has had acceptable to excellent performance. I would also like to point out that post Go1 there are aggressive compiler and garbage collector upgrades waiting to commit. Go is still young.
Maybe Go currently isn't better than Java (currently) on the CPU front, but it is better Java on the memory front:
http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=...
Low memory usage and "good enough" CPU usage is more important to most real world apps.
Also, go is still much better than something like PHP on the CPU front:
http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=...
I'm also interested in which version of go you ran your test with.
While I really like Go and see myself doing serious programming with it in the not too far off future I have to agree with top poster that it is currently quite slow from my tests and also tests I've seen on Language Shootout. Still, like you said it's a very young language and I'm guessing the focus sofar has been on squashing bugs and pinning down the exact language properties.
Also I've only tried the official 64-bit compiler (6g), I hear the GccGo compiler creates much more optimized code (due to it hooking into GCC's much more mature optimizing backend) so that's an option and also it proves that there's alot more performance to be crammed out of the official compilers given time.
Not that kind of benchmark.
I did some testing using ApacheBench.
I manually managed to go up to 10k RPS for Go (setting up number of cores). But all this is still too slow (7 times slower).
http://pokazywarka.pl/aiuo77/
Thanks for reply.
Your code performs as well as mine on my machine.
Setting Date to blank has a barely noticable influence on benchmark results.
A greater role has setting proper number of cores and http chunking.
BTW im running a Linux machine, so I have GOMAXPROCS set up manually to 2*n_cores (4) in bashrc.
Before that i had 6-7k RPCs just like You. Thanks for "runtime" line so from now on I wont have to use manual setup.
Edited 2012-03-31 01:53 UTC





Member since:
2011-04-23
Go Web sever with bare "hello world" is 10x slower than equivalent in C and almost as fast as Java Play Framework with a lot of magic behind.
This is unacceptable. When I'll place my app written in Go on Cloud service it will cost me a lot for wasted CPU time.