News for hackers. Stuff that matters.
Re:Go vs. Crystal Performance by piinbinary on Tuesday June 23, 2020 @12:02PM (#23615741)
I wonder how the GC pause times and throughput compare. My understanding is that Go sacrifices some compute performance for better GC pause times.
Re:Go vs. Crystal Performance by dgb23 on Tuesday June 23, 2020 @12:08PM (#23615825)
> better GC pause times

What does that mean exactly / in this case?

My assumption is that "better" means more predictable. Or does it mean straight up fewer/shorter?

Re:Go vs. Crystal Performance by gen220 on Tuesday June 23, 2020 @01:05PM (#23616824)
Rick Hudson gave this excellent keynote on some of the "recent" (as of 2018) improvements and guiding principles for Go's GC, if you're interested in the nitty-gritty. https://blog.golang.org/ismmkeynote

He outlines the SLOs for the garbage collector, with the motivation that this SLO impacts the SLOs/time budget of every application built with Go. They key metrics are "share of CPU used for GC", heap sizes, latency and frequency of pauses, and scaling favorably with go-routine allocations.

Re:Go vs. Crystal Performance by recursivecaveat on Tuesday June 23, 2020 @12:53PM (#23616584)
Go sacrifices basically every other GC metric to minimize average pause times. Sortof a 'if you can't succeed, redefine success' mentality if you will.
Re:Go vs. Crystal Performance by sharpy on Tuesday June 23, 2020 @01:17PM (#23617027)
That's not necessarily a bad thing for writing web services. I used to spend a fair bit of time tuning JVM to achieve acceptable tail latencies for Java services, not to mention once in a while, they would need to be tuned again... Not so with Go.
Re:Go vs. Crystal Performance by apta on Tuesday June 23, 2020 @08:12PM (#23622183)
Java now has two low latency collectors: ZGC and Shenandoah.
Re:Go vs. Crystal Performance by jashmatthews on Tuesday June 23, 2020 @06:40PM (#23621280)
The Go GC and the JVM GCs are built within very, very different constraints.

Since most short-lived allocations in Go are stack-allocated, the cost of adding a read-barrier and branching on every heap access is more expensive than the potential gain from bump-pointer allocation.

Re:Go vs. Crystal Performance by mr_aks on Tuesday June 23, 2020 @12:53PM (#23616600)
In Go's case, it means that GC pauses are shorter because it uses a concurrent mark and sweep algorithm.