"Remarkably, we had only put very basic thought into optimization as the Rust version was written. Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. This is a huge testament to how easy it is to write efficient programs with Rust compared to the deep dive we had to do with Go."
https://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f
> "Remarkably, we had only put very basic thought into optimization as the Rust version was written. Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. This is a huge testament to how easy it is to write efficient programs with Rust compared to the deep dive we had to do with Go."
This article does not tell use when the switch from Go to Rust was made. But it is interesting to see that they compare the ancient Go version 1.9 with bleeding endge Rust. I am no expert for GC in Go but I would strongly assume that since Go 1.9 much has been improved to handle situations like those described in the article.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c3d9fc18-b750-48d7-b0b8-fd78afdbbf29%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu2wEHsC0fo32srrrJnXnLA2-s%2BzJ82JF7T96NqtQBkUVQ%40mail.gmail.com.
On Feb 7, 2020, at 12:57 PM, Marcin Romaszewicz <mar...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29Lu6RNc8XssP58y3EVk8idGo%3D%3D3YdOToOVdzH--AkknGbg%40mail.gmail.com.
I didn’t look into the project but reading between the lines here I am betting that Java would perform as well as Rust in this case. This is an example of where not having generational GC hurts badly - since it appears that most of their heap would be very long lived objects.
On Feb 7, 2020, at 3:29 PM, Marcin Romaszewicz <mar...@gmail.com> wrote:
Go, on the other hand...I'm an old
hand from the same culture the Go devs exemplify.
p.s. Does anyone know how well Rust reads as this is highly important to me?
They had said they were generating almost no garbage.If that is true, I suspect they could have avoided the 2-minute forced GC by running with GOGC=off, or alternatively executed SetGCPercent(-1) (https://golang.org/pkg/runtime/debug/#SetGCPercent) to disable the GC programmatically after reaching steady-state.Perhaps what would have worked for them. If needed, perhaps they could have also had a helper goroutine that ran, say, once an hour to run runtime.GC() manually, or once a day or whatever frequency might have seemed rationale based on their workload.I suspect that would have been sufficient as a simple workaround?thepudds