4 ms·
Golang performance profile is very different from Java. It's speed is closer to C++, garbage collection optimized for latency, not bandwidth, very low startup t
by fpoling 10y ago
Golang performance profile is very different from Java. It's speed is closer to C++, garbage collection optimized for latency, not bandwidth, very low startup time comparable with typical native code.
- Jweb_Guru 10y agoYou can actually get a performance profile very much like Go's out of Java... * Inasmuch as you can make a blanket statement like this about a language, Go's speed is very much comparable to Java's. * Java has a huge number of garbage collectors available. You're just talking about the default, but there are extremely low-latency GCs. * Java has a bunch of ahead-of-time compilers; thanks to Android this might be the most common deployment of Java. Even green threads were tried (and sensibly abandoned) in Java before. I think people may not be aware of all the options available in the Java ecosystem, but other than sized types, which are theoretically coming to Java 10, there isn't much performance-wise that Go does and Java doesn't.
- mahyarm 10y agoJust because a language is compiled doesn't mean it will approach C++ speeds. The GC itself is a hard limit on perf. What I've seen in practice: 1x time: C 1.5x time: C++ (with smart pointers) ~2x time: Objective-C (almost everything is a heap smart pointer) 3x time: Java, Golang (optimized GC languages)