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.

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

292 pointsby joncatanioabout 7 years ago

9 comments

joncatanioabout 7 years ago
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 未加载
taoistextremistabout 7 years ago
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 未加载
harrisreynoldsabout 7 years ago
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_gabout 7 years ago
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.
ufoabout 7 years ago
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 未加载
tathougiesabout 7 years ago
Interesting project... Why python, out of curiosity?
评论 #17093882 未加载
gabcohabout 7 years ago
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
Beltirasabout 7 years ago
Leave the features - take the cannoli.<p>Made me laugh out loud.
alexnewmanabout 7 years ago
Skimmed it. They spent a lot of time flushing printing to the screen