3 ms·
Go code itself is much faster than any dynamic language. But many Go libraries (like regex or http) are very immature and horribly slow, as is the garbage colle
by fauigerzigerk 16y ago
Go code itself is much faster than any dynamic language. But many Go libraries (like regex or http) are very immature and horribly slow, as is the garbage collector, which is the reason for the bad averages in the alioth shootout. Also, there are many well known compiler optimizations that haven't been implemented yet (e.g. optimizing away bounds checking where possible). The stated goal of Go's creators is that Go should be around 20% slower than C.
It's probably a stretch but considering the speed difference between RAM and the harddisk, real life speed of an app has a very close inverse relationship to memory usage. Go uses very little memory, and I don't just mean the runtime itself. Contrary to Java it doesn't treat everything (other than primitive types) as reference types, which hugely reduces the number of pointers.
I think Go is very promising. It's going to be very fast, it's very memory efficient, and it makes massive parallelism incredibly simple. It greately reduces the pain and inflexibility of statically typed languages through type inference and after the fact interface conformance (or whatever the proper name for that feature is)
- igouy 16y ago> But many Go libraries (like regex or http) are very immature and horribly slow, as is the garbage collector, which is the reason for the bad averages in the alioth shootout. If that was true, taking regex-dna and pi-digits and binary-trees out of the data would shift the median significantly - (last time I checked) it doesn't. However it is an explanation for that 13x slower data point.
- fauigerzigerk 16y agoI don't know exactly which libraries are immature and slow. These were just examples. Whether a language is optimizable for speed is to some degree a theoretical property, so I wouldn't worry too much about speed at this point. It's going to come as Go has everything it takes.
- igouy 16y agoSo it was just gossip.