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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

We Rewrote Our Project with Rust and It’s Almost 40X Faster

37 点作者 peefy大约 2 年前

4 条评论

bluesnowmonkey大约 2 年前
Sure, Rust is fast, but Python is really, aggressively slow. They could rewrite in basically any compiled language (or even some of the dynamic ones) and come out way ahead. It's such a frustrating experience trying to wring halfway decent performance out of a project written in Python when the lowest level fundamental operations like "accessing a property on an object" and "looping" are performance landmines.
评论 #34995123 未加载
评论 #34992411 未加载
评论 #34992846 未加载
评论 #34993762 未加载
评论 #34992667 未加载
karmakaze大约 2 年前
Basic context seems like an ideal opportunity for a rewrite. Other benefits besides speedup in the article.<p>&gt; The project we are developing using Rust is called KCL. (KCL) is an open-source constraint-based record and functional language. It improves the writing of complex configurations through a mature programming language stack.<p>&gt; KCL was written in Python before.
评论 #34992466 未加载
fulafel大约 2 年前
&gt; We used Python, Go, and Rust to implement a simple programming language stack virtual machine and compared their performance. In this scenario, Go and Rust have similar performance, while Python showed a significant performance gap. After careful consideration, we chose Rust.<p>Would have been interesting to hear why they didn&#x27;t benchmark other languages suited to programming language implementation. Go is obviously rather weak in expressivity there, and other options which have both automatic memory management and high performance exist.<p>But the 66% bottom line performance improvement does sound like a nice improvement.
评论 #34992657 未加载
dejot大约 2 年前
We rewrote our project with &lt;insert compiled language&gt; and it&#x27;s almost &lt;insert number&gt;X faster<p>Well, than Python. Who would have thought that?