TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why Discord is switching from Go to Rust (2020)

77 pointsby hiena03about 3 years ago

12 comments

technologicalabout 3 years ago
Previous Discussion<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22238335" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22238335</a>
verdagonabout 3 years ago
I suspect that GC&#x27;d languages could mitigate this problem by introducing regions; separate areas of memory that cannot point at each other. Pony actors [0] have them, and Cone [1] and Vale [2] are trying new things with them.<p>If golang had this, then it might not ever need to run its GC because it could just fire up a new region for every request. The request will likely end and blast away its memory before it needs to collect, or it could choose to collect only when that particular goroutine&#x2F;region is blocked.<p>Extra benefit: if there&#x27;s an error in one region, we can blast it away and the rest of the program continues!<p>[0] <a href="https:&#x2F;&#x2F;tutorial.ponylang.io&#x2F;types&#x2F;actors.html#concurrent" rel="nofollow">https:&#x2F;&#x2F;tutorial.ponylang.io&#x2F;types&#x2F;actors.html#concurrent</a><p>[1] <a href="https:&#x2F;&#x2F;cone.jondgoodwin.com&#x2F;fast.html" rel="nofollow">https:&#x2F;&#x2F;cone.jondgoodwin.com&#x2F;fast.html</a><p>[2] <a href="https:&#x2F;&#x2F;verdagon.dev&#x2F;blog&#x2F;seamless-fearless-structured-concurrency" rel="nofollow">https:&#x2F;&#x2F;verdagon.dev&#x2F;blog&#x2F;seamless-fearless-structured-concu...</a>
评论 #31020060 未加载
erikbyeabout 3 years ago
Not discrediting Rust, but I&#x27;ve noticed you rarely hear &quot;we improved performance&quot; by rewriting our implementation using the same language... Although this, too, can yield similar performance improvements.
评论 #31021947 未加载
评论 #31023602 未加载
评论 #31019820 未加载
pfrazeabout 3 years ago
I’m told the Go GC has gotten better in recent years. Has anybody run a similar program in Go lately that can confirm that?
phendrenad2about 3 years ago
(2020)<p>(Anyone know if they&#x27;re still using Rust?)
评论 #31019789 未加载
评论 #31019640 未加载
评论 #31019785 未加载
mc4ndr3about 3 years ago
How illuminating. From CloudFlare posts, I had been under the impression that Go&#x27;s gc was incredibly unintrusive, near-real time performance for applications operating in increments of a few hundred milliseconds. For example, CloudFlare uses Go to analyze network traffic.<p>Yes, Rust provides a more predictable, faster memory management model than Go. At the expense of unpredictable, expensive memory leaks triggering application termination.<p>Curious how much time and effort was dedicated to improving gc, which is a useful endeavor in its own right.
评论 #31020558 未加载
评论 #31019880 未加载
评论 #31021379 未加载
评论 #31023669 未加载
评论 #31024655 未加载
alberthabout 3 years ago
Isn’t this a function of them being such heavy Erlang users and are writing NIFs (via Rustler) in Rust.
midrusabout 3 years ago
Or they just got bored and wanted to try some shinier toy. I&#x27;ve seen this happen dozens of time, all the bullshit for justifying it is just that, bullshit.<p>Not saying this is the case here but highly likely.
butterisgoodabout 3 years ago
Well... is this still true? Go&#x27;s had a lot of perf improvements in the last two years.
评论 #31022830 未加载
评论 #31023706 未加载
sys_64738about 3 years ago
C with coroutines?
loudtieblahblahabout 3 years ago
meh. I&#x27;m switching from Discord to Guilded.
boxingrockabout 3 years ago
isn&#x27;t the tldr on this that Go let them scale up for years before it became the bottleneck? a natural progression for any successful project...