news.volyx.in

Why Discord is switching from Go to Rust (blog.discordapp.com)

1582 points by Sikul · 2441 days ago · 642 comments on HN

Article summary

Discord is switching from Go to Rust for performance-critical services. The decision is driven by the need for better performance and memory efficiency. Rust's lack of runtime and garbage collector makes it a better choice for applications that require low latency and high throughput. This change is part of Discord's effort to improve the overall performance and responsiveness of its services.

Main themes

  • Programming language choice
  • Performance optimization
  • Garbage collection
  • Language design philosophy
  • Desktop application development
  • Electron framework

What commenters say

  • Some commenters suggest that Go's garbage collector is a major limitation for building high-performance applications, and that Rust is a better choice for such use cases. Others argue that Go's simplicity and ease of use are more important than raw performance, and that the language's design philosophy is not flawed. A few commenters propose that Go could be improved by adding features like manual memory allocation or more advanced garbage collection options. Some argue that the choice of Rust is driven by the company's prior experience with the language, rather than a purely technical decision. Others point out that desktop application development often prioritizes ease of development over performance optimization, which can result in slow startup times and other issues. A few commenters note that Electron, the framework used by Discord, can introduce additional performance overhead due to its use of Chromium and JavaScript. Some argue that the focus on server-side performance is misplaced, and that client-side performance is equally important for providing a good user experience.
  • themes": [