The version of C# that you used may be rather old, but it could also be said that C# (and .NET) 3.5 was at a greater relative level of maturity than Go is right now, with 3.5 coming after nearly 6 years of platform existence, and Go 1.0.2 coming out 3-4 years after the language was announced.
Additionally, Microsoft considers C# .NET their flagship commercial/enterprise language/platform, probably giving it considerably more salaried attention and resources than Go is getting from Google, since Google heavily uses a variety of other languages, including Python and C++, and has more of a utilitarian tool culture, rather than trying to make "one language fit all tasks."
That said, I don't think it's bad at all that gc produces a binary that may be doing 90 million reads and 60 million writes in 78ms, since:
1) no "real" program does intentional "do nothing" loops, and thus it's a very low-value candidate for optimization (if it can be optimized away, it at best indicates poorly written code, and at worst, indicates a bug).
2) considering for me, using JussiJ's Go snippet, and the following C code, compiled -O0 (no optimizations):
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
int main(int argc, char *argv[])
{
int i, j = 0;
double ms;
struct timeval tv1, tv2;
gettimeofday(&tv1, NULL);
for(i = 0; i < 30000000; i++)
j += 1;
gettimeofday(&tv2, NULL);
ms = (tv2.tv_sec-tv1.tv_sec)*1000 + ((double)(tv2.tv_usec-tv1.tv_usec))/1000;
printf("Total time taken: %fms\n", ms);
return 0;
}
Or this python:
from time import time
i = j = 0
start = time()
while i < 30000000:
j += 1
i += 1
end = time()
print "Total time taken: %fms" % ((end - start) * 1000)
I get the following results:
Go: Total time taken: 70.884ms ...
C -O0: Total time taken: 62.040000ms
CPython 2.7.3: Total time taken: 22365.461826ms
That tells me it takes at least 62 ms to do that much work on my system. Period. Here, go is only 14% slower for an utterly meaningless cpu-bound task. That's hardly "bad". Python's is 360x (times, not percent) slower, which is to be expected.
For those of you who think this was a good benchmark, read the entirety of the site: <
http://shootout.alioth.debian.org/>. They actually have benchmarks there that aren't so brittle, yet they rightly admit that their benchmarks are not representative of the quality of the languages they are benchmarking, and further, all of these benchmarks only deal with cpu-bound tasks.