3 ms·
The thing with Java is that it's harder to make code fast, in Go it's easier.
by Thaxll 5y ago
The thing with Java is that it's harder to make code fast, in Go it's easier.
- winrid 5y agoCould you provide an example or citation?
- deleted 5y ago[deleted]
- erik_seaberg 5y agoSun made huge investments into HotSpot to optimize reusable object-oriented code. As I understand it, GC and interface method dispatch on heap objects are relatively slower in Go so they’re mildly discouraged.
- NovaX 5y agoMy only experience with Go was to help advise a team when porting a Java cache. They struggled with performance because Go kept fighting them. This was partially due to it having a poor concurrency library, resulting in excessive use of read/write locks whereas Java's advanced capabilities made more things lock-free. The database founder noted that Golang is slow single-threaded but makes up for it via concurrency and low latency. To my unexperienced eyes, it seemed like a real PITA mostly because the Go authors insisted on artificial limitations externally, but bypassed them internally. I certainly have not found it hard to make Java fast and the core developers have always been open minded when I've talked to them.