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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Cannoli – A compiler for a subset of Python written in Rust

292 点作者 joncatanio大约 7 年前

9 条评论

joncatanio大约 7 年前
I recently finished the code for my thesis and wanted to share with you all :). The goal of the thesis was to evaluate language features of Python that were hypothesized to cause performance issues. Quantifying the cost of these features could be valuable to language designers moving forward. Some interesting results were observed when implementing compiler optimizations for Python. An average speedup of 51% was achieved across a number of benchmarks. The thesis paper is linked on the GitHub repo, I encourage you to read it!<p>This was also my first experience with Rust. The Rust community is absolutely fantastic and the documentation is great. I had very little trouble with the &quot;learning curve hell&quot; that I hear associated with the language. It was definitely a great choice for this work.<p>I also included PyPy in my validation section and &quot;WOW&quot;. It blew both Cannoli and CPython out of the water in performance. The work they&#x27;re doing is very interesting and it definitely showed on the benchmarks I worked with.
评论 #17098151 未加载
评论 #17095680 未加载
评论 #17093597 未加载
评论 #17093920 未加载
评论 #17099556 未加载
评论 #17095494 未加载
评论 #17093731 未加载
评论 #17096350 未加载
评论 #17099224 未加载
评论 #17094226 未加载
taoistextremist大约 7 年前
This isn&#x27;t a really important question, but why the name Cannoli? I feel like you missed an opportunity here to call it &quot;PycRust&quot;. (c standing for &quot;compiled to&quot; of course)
评论 #17093912 未加载
评论 #17096806 未加载
评论 #17093873 未加载
评论 #17094003 未加载
harrisreynolds大约 7 年前
Nice work Jon! The cannoli logo is great!<p>Spun up a quick dashboard of the project here: <a href="https:&#x2F;&#x2F;chart.ly&#x2F;github-dashboard&#x2F;joncatanio&#x2F;cannoli" rel="nofollow">https:&#x2F;&#x2F;chart.ly&#x2F;github-dashboard&#x2F;joncatanio&#x2F;cannoli</a><p>Not tons of revelations there, but cool to see your longest streak was 7 days straight committing to the repo. Also cool to know this is part of your thesis.<p>What are your plans after Cal Poly?
评论 #17093811 未加载
alex_g大约 7 年前
This is awesome! I definitely recommend reading through Jon&#x27;s thesis (link on GitHub). It&#x27;s well written and very readable even if you know nothing of Rust or compilers.
ufo大约 7 年前
How was your experience using Rust as a target language (instead of C)? I understand that Rust has lots of features for when you want to write code by hand but do those also help when you are working with generated code? Or does the borrow checker get in the way all the time?
评论 #17095340 未加载
评论 #17097843 未加载
tathougies大约 7 年前
Interesting project... Why python, out of curiosity?
评论 #17093882 未加载
gabcoh大约 7 年前
The name of the thesis this repo is a part of<p>&gt; Leave the Features: Take the Cannoli - Jonathan Catanio<p>That&#x27;s pretty good
Beltiras大约 7 年前
Leave the features - take the cannoli.<p>Made me laugh out loud.
alexnewman大约 7 年前
Skimmed it. They spent a lot of time flushing printing to the screen