Linked by Thom Holwerda on Wed 28th Mar 2012 19:22 UTC
General Development "Today marks a major milestone in the development of the Go programming language. We're announcing Go version 1, or Go 1 for short, which defines a language and a set of core libraries to provide a stable foundation for creating reliable products, projects, and publications. Go 1 is the first release of Go that is available in supported binary distributions. They are available for Linux, FreeBSD, Mac OS X and, we are thrilled to announce, Windows."
Thread beginning with comment 512296
To read all comments associated with this story, please click here.
Too bad it is so slow
by kalcytriol on Thu 29th Mar 2012 14:55 UTC
kalcytriol
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.

Reply Score: 1

RE: Too bad it is so slow
by voidlogic on Thu 29th Mar 2012 16:43 in reply to "Too bad it is so slow"
voidlogic Member since:
2005-09-03

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.

Reply Parent Score: 2

RE[2]: Too bad it is so slow
by Valhalla on Thu 29th Mar 2012 21:41 in reply to "RE: Too bad it is so slow"
Valhalla Member since:
2006-01-24

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.

Reply Parent Score: 2

RE[2]: Too bad it is so slow
by kalcytriol on Thu 29th Mar 2012 21:59 in reply to "RE: Too bad it is so slow"
kalcytriol Member since:
2011-04-23

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/

Reply Parent Score: 1

RE[2]: Too bad it is so slow
by kalcytriol on Sat 31st Mar 2012 01:51 in reply to "RE: Too bad it is so slow"
kalcytriol Member since:
2011-04-23

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

Reply Parent Score: 1