News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust by abraxas on Tuesday February 04, 2020 @02:36PM (#22239986)
Because many services eventually become performance bottlenecked either via accumulation of users or accumulation of features. In either case eventually performance becomes very critical.
Re:Why Discord is switching from Go to Rust by _ph_ on Tuesday February 04, 2020 @03:16PM (#22240441)
Sure, but that doesn't make Go unsuitable for those tasks on a fundamental basis. Go is very high performance. Whether Go or another language is the best match very much depends on the problem at hand and the especial requirements. Even in the described case they might have tweaked the GC to fit their bill.
Re:Why Discord is switching from Go to Rust by abraxas on Tuesday February 04, 2020 @07:08PM (#22242587)
GC pauses aside can Go match the performance of Rust when coded properly? Would sorting an array of structs in Go be in the same ballpark as sorting the same sized array of structures in Rust? I don't know a whole lot about how Go manages the heap under the covers.
Re:Why Discord is switching from Go to Rust by cdoxsey on Tuesday February 04, 2020 @08:34PM (#22243177)
Sure. That kind of code is very similar in both languages.

Rust will probably be faster because it benefits from optimizations in LLVM that Go likely doesn't have.

Go arrays of structs are contiguous, not indirect pointers.