|
|
|
|
|
by tofuahdude
1439 days ago
|
|
How "large" is the garbage collector penalty? My understanding is that the Go GC is significantly more efficient than for example JS's mark/sweep approach. Apples to oranges for sure, but I am interested in better understanding how expensive the Go GC is vs Rust performance. |
|
If I interpret the graphs correctly, I see:
Golang:
* baseline 20% cpu + spikes to 35% once the GC runs.
* response times of about 1ms + spikes up to 10ms.
Rust:
* baseline 12% cpu + flat, no spiking.
* response times of 20us + flat, no spiking (!).
In terms of scaling, I interpret the results in favor of Rust.
My reasoning is the more you run the GC, the bigger the penalty.