This man speaks the truth. Well, actually, I know nothing about Lua. But I do know that Go currently isn't very fast. I mean, compared to highly dynamic languages the performance is fine. But compared to C++ or even modern JVM it's meh.
I feel like there's going to be improvement here, though, and I wouldn't be surprised if the versions of golang used internally at Google aren't faster.
My take has been to use it the way I imagine Google does. If I'm not building something that uses protobuffs and goroutines I do it in Python.
When you say that Go currently isn't very fast, maybe you should try coding something in it. I found it to be suprisingly fast. I think if you are doing a lot of memory allocation, then the garbage collection may slow you down, but I wouldn't be suprised if it's still faster than a jitted language like LuaJIT.
My largest Golang deployment is a blender service. That's where I used the Goroutines and protocol buffers I mentioned earlier.
Its speed is acceptable. My take on it is that this is a new language. Of course it doesn't have fully mature, fully optimized internals. And certainly part of the problem is that I haven't developed a full mastery of the language (Mastery is not a word i use lightly) so that will improve, too.
But if your experience is that you've built multi-threaded apps in Go that perform comparable to a c++ implementation then I'd love to know if you have any specific tips and also I suppose that means that we're not going to see any broad improvements in runtime performance?
I recommend trying gccgo, the Go compiler for the GCC suite. (GCC 4.7.1 and later have Go built in.)
In my experience it is (at -O2) much faster than Go's own compiler. GCC, after all, has because a bunch of advanced optimizers with a long history of development behind them, and Go's own compiler does not.
My recolleciton is that Go's own compiler was intended as a "suboptimal but correct" reference compiler, but this may have changed.
>When you say that Go currently isn't very fast, maybe you should try coding something in it. I found it to be suprisingly fast.
I've tried in in 2-3 things which I re-implemented afterwards in C and had before in Python.
In all cases it has about 2x the speed of Python, which I consider meh.
(The tasks where mostly parsing some huge files and doing some filtering and computations, and C made it IO bound while Python/Go both had it CPU bound).
This man speaks the truth. Well, actually, I know nothing about Lua. But I do know that Go currently isn't very fast. I mean, compared to highly dynamic languages the performance is fine. But compared to C++ or even modern JVM it's meh.
I feel like there's going to be improvement here, though, and I wouldn't be surprised if the versions of golang used internally at Google aren't faster.
My take has been to use it the way I imagine Google does. If I'm not building something that uses protobuffs and goroutines I do it in Python.