TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why Discord is switching from Go to Rust (2020)

77 点作者 hiena03大约 3 年前

12 条评论

technological大约 3 年前
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>
verdagon大约 3 年前
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 未加载
erikbye大约 3 年前
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 未加载
pfraze大约 3 年前
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?
phendrenad2大约 3 年前
(2020)<p>(Anyone know if they&#x27;re still using Rust?)
评论 #31019789 未加载
评论 #31019640 未加载
评论 #31019785 未加载
mc4ndr3大约 3 年前
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 未加载
alberth大约 3 年前
Isn’t this a function of them being such heavy Erlang users and are writing NIFs (via Rustler) in Rust.
midrus大约 3 年前
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.
butterisgood大约 3 年前
Well... is this still true? Go&#x27;s had a lot of perf improvements in the last two years.
评论 #31022830 未加载
评论 #31023706 未加载
sys_64738大约 3 年前
C with coroutines?
loudtieblahblah大约 3 年前
meh. I&#x27;m switching from Discord to Guilded.
boxingrock大约 3 年前
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...